How to update GUI from Inherit Class [message #1395194] |
Sun, 06 July 2014 14:37 |
Phat Hong Chan Messages: 2 Registered: July 2014 |
Junior Member |
|
|
I have 2 panels: Panel1 and Panel2, the Panel2 inherit from Panel1. In constructor of Panel1, I create 3 JLabels and display them in order Label1-Label2-Label3. When I switch from Source Tab to Design Tab, the Preview Window display corectly what I want
In constructor of Panel2, I want to custom Panel1, so, I change order of 3 JLabels, like this:
public class Panel2 extends Panel1 {
public Panel2() {
super();
reverse();
}
}
but when I switch from Source Tab to Design Tab, int Preview Window, nothing change
-
Attachment: Panel2.java
(Size: 0.11KB, Downloaded 163 times) -
Attachment: 1.jpg
(Size: 125.37KB, Downloaded 950 times) -
Attachment: 2.jpg
(Size: 204.42KB, Downloaded 794 times) -
Attachment: Panel1.java
(Size: 2.31KB, Downloaded 304 times)
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03716 seconds