public IndependenceSwingTest() {
frame = new JFrame();
frame.setSize(200, 200);
// This textfield will be used to update the contents of clipboards
tf1 = new JTextField();
tf1.addFocusListener(new FocusAdapter() {
public void focusGained(FocusEvent fe) {
tf1.setText("Clipboards_Independance_Testing");
}
});
// TextFields to get the contents of clipboard
tf2 = new JTextField();
tf3 = new JTextField();
panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(tf2, BorderLayout.NORTH);
panel.add(tf3, BorderLayout.SOUTH);
frame.add(tf1, BorderLayout.NORTH);
frame.add(panel, BorderLayout.CENTER);
frame.setVisible(true);
tf1.requestFocus();
}
IndependenceSwingTest.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录