<分区>
这就是我想要的
这是我运行 Java 应用程序时显示的内容。 (看我按钮上的文字,文本框中的文字是java)
我在 Windows 7 上使用 Eclipse Luna。
附言:My labels are blurry in Java没有任何帮助
public class DownloadManager {
private JFrame frame;
private JTable table;
private JTextField txtUrl;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
DownloadManager window = new DownloadManager();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public DownloadManager() {
initialize();
}
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 752, 514);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
table = new JTable();
table.setBounds(47, 190, 629, 250);
frame.getContentPane().add(table);
txtUrl = new JTextField();
txtUrl.setBounds(47, 84, 391, 34);
frame.getContentPane().add(txtUrl);
txtUrl.setColumns(10);
JButton btnDownload = new JButton("Download");
btnDownload.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
}
});
btnDownload.setBounds(534, 78, 99, 47);
frame.getContentPane().add(btnDownload);
}
}
编辑:
Swing rendering appears broken in JDK 1.8, correct in JDK 1.7建议的解决方案即,将 NVIDIA GeForce 630M 的能量控制设置更改为最高性能并没有帮助。