public TestFrame() {
super("TestFrame");
// The change of the orientation and the reverse order of
// adding the buttons to the panel is because in Container.removeNotify()
// the child components are removed in the reverse order.
// We want that the focus owner (b0) would be removed first and
// that the next traversable component would be b1.
panel0.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
panel0.add(b2);
panel0.add(b1);
panel0.add(b0);
panel1.add(b3);
panel1.add(b4);
setLayout(new FlowLayout());
add(panel0);
add(panel1);
pack();
panel0.setBackground(Color.red);
panel1.setBackground(Color.blue);
}
ContainerFocusAutoTransferTest.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:lookaside_java-1.8.0-openjdk
作者:
评论列表
文章目录