JxBrower6.21破解版,引用jar包,添加代码:
static {
try {
Field e = ba.class.getDeclaredField("e");
e.setAccessible(true);
Field f = ba.class.getDeclaredField("f");
f.setAccessible(true);
Field modifersField = Field.class.getDeclaredField("modifiers");
modifersField.setAccessible(true);
modifersField.setInt(e, e.getModifiers() & ~Modifier.FINAL);
modifersField.setInt(f, f.getModifiers() & ~Modifier.FINAL);
e.set(null, new BigInteger("1"));
f.set(null, new BigInteger("1"));
modifersField.setAccessible(false);
} catch (Exception e1) {
e1.printStackTrace();
}
}
public static void main(String[] args) {
final String url = "http://10.0.1.10/TopIcis/InitialMainFrameUI.do";
final String title = "百度";
Browser browser = new Browser();
BrowserView view = new BrowserView(browser);
JFrame frame = new JFrame();
//禁用close功能
//frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
//不显示标题栏,最大化,最小化,退出按钮
//frame.setUndecorated(true);
frame.setSize(400, 600);
frame.add(view, BorderLayout.CENTER);
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setLocationByPlatform(true);
frame.setVisible(true);
browser.loadURL(url);
}
1