hi,
i have a problem that the visible status of a component does not get
synchronized to the server.
see the following two programs one is swing one is ulc. when i press the button
test in the ulc version
both labels are always visible. in the swing program it depends on which tab is
active.
this is a big problem for me because i have validation code which validates
visible components but since for ulc
all components are visible even if they are not visible i'm going to validate a
lot too much components which makes
my system really slow.
can you fix that as soon as possible ? or give me at least a feasible
workaround ?
public class SwingTabTest extends JFrame {
final JLabel tf1 = new JLabel("Feld 1");
final JLabel tf2 = new JLabel("Feld 2");
final JButton test = new JButton("test");
public SwingTabTest() {
JTabbedPane jt = new JTabbedPane();
jt.setFocusable(false);
jt.addTab("Tab 1", tf1);
jt.addTab("Tab 2", tf2);
getContentPane().setLayout(new BorderLayout());
test.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("action");
System.out.println("tf1 visible: " + tf1.isVisible());
System.out.println("tf2 visible: " + tf2.isVisible());
}
});
getContentPane().add(test, BorderLayout.NORTH);
getContentPane().add(jt, BorderLayout.CENTER);
}
public static void main(String[] args) {
SwingTabTest stt = new SwingTabTest();
stt.setBounds(10,20,300,400);
stt.setVisible(true);
}
}
public class ULCTabTest extends AbstractApplication {
final ULCLabel lbl1 = new ULCLabel("Tab1");
final ULCLabel lbl2 = new ULCLabel("Tab2");
final ULCButton test = new ULCButton("test");
public void start() {
final ULCFrame frame = new ULCFrame("Test");
ULCBorderLayoutPane blp = new ULCBorderLayoutPane();
ULCTabbedPane tp = new ULCTabbedPane();
tp.setFocusable(false);
tp.addTab("Tab1", lbl1);
tp.addTab("Tab2", lbl2);
frame.setBounds(10, 20, 300, 400);
frame.setDefaultCloseOperation(ULCFrame.DISPOSE_ON_CLOSE);
blp.add(tp, ULCBorderLayoutPane.CENTER);
test.addActionListener(new IActionListener() {
public void actionPerformed(ActionEvent event) {
System.out.println("lbl1.visible: " + lbl1.isVisible());
System.out.println("lbl2.visible: " + lbl2.isVisible());
}
});
blp.add(test, ULCBorderLayoutPane.NORTH);
frame.getContentPane().add(blp);
frame.setVisible(true);
}
public static void main(String[] args) {
DevelopmentRunner.setApplicationClass(ULCTabTest.class);
DevelopmentRunner.main(args);
}
}
regards
Dejan
mailto:[EMAIL PROTECTED]
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer