N
Nicolas
Maybe another problem of JPanel refresh....
In a JApplet, I have a big Panel, split in 3 other JPanel :
panelNorth, panelCentral, panelSouth
In the North, I have a few JButtons, in the Center, I want to put main
datas, in the South, I have a few JLabel
I have made a JButton who put another JPanel in panelCentral
The code linked to the event is :
MyDataPanel panel = new MyDataPanel( );
this.panelCentral.add(panel, java.awt.BorderLayout.CENTER);
System.out.println("Yop");
The problem is that when I click the Button, nothing appears except
"Yop" in the Java Console.
Yet when I push this code in the Constructor, everything is fine when
I start the Applet.
So I have tried many combinations of setVisible, paint and repaint,
nothing is good...
With a frame, I succeeded making a setContentPane(getContentPane( ) )
.. Is there a more logical and more efficient way with JPanel ???
Thanx a lot !
Nicolas (Sorry for my English)
In a JApplet, I have a big Panel, split in 3 other JPanel :
panelNorth, panelCentral, panelSouth
In the North, I have a few JButtons, in the Center, I want to put main
datas, in the South, I have a few JLabel
I have made a JButton who put another JPanel in panelCentral
The code linked to the event is :
MyDataPanel panel = new MyDataPanel( );
this.panelCentral.add(panel, java.awt.BorderLayout.CENTER);
System.out.println("Yop");
The problem is that when I click the Button, nothing appears except
"Yop" in the Java Console.
Yet when I push this code in the Constructor, everything is fine when
I start the Applet.
So I have tried many combinations of setVisible, paint and repaint,
nothing is good...
With a frame, I succeeded making a setContentPane(getContentPane( ) )
.. Is there a more logical and more efficient way with JPanel ???
Thanx a lot !
Nicolas (Sorry for my English)