Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » How to update GUI from Inherit Class
How to update GUI from Inherit Class [message #1395194] Sun, 06 July 2014 10:37 Go to next message
Eclipse UserFriend
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
index.php/fa/18475/0/

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
index.php/fa/18476/0/
  • Attachment: Panel2.java
    (Size: 0.11KB, Downloaded 183 times)
  • Attachment: 1.jpg
    (Size: 125.37KB, Downloaded 990 times)
  • Attachment: 2.jpg
    (Size: 204.42KB, Downloaded 837 times)
  • Attachment: Panel1.java
    (Size: 2.31KB, Downloaded 318 times)
Re: How to update GUI from Inherit Class [message #1396746 is a reply to message #1395194] Tue, 08 July 2014 14:22 Go to previous messageGo to next message
Eclipse UserFriend
The method, reverse(), means precisely nothing to WIndowBuilder.

WIndowBuilder is a design time tool, and the reverse() method is pure runtime behavior.
Re: How to update GUI from Inherit Class [message #1398289 is a reply to message #1396746] Thu, 10 July 2014 18:39 Go to previous messageGo to next message
Eclipse UserFriend
So, there is no way of doing polymorphism(eg.: Inheriting properties and components from other class) in WindowBuider?
Re: How to update GUI from Inherit Class [message #1399051 is a reply to message #1398289] Fri, 11 July 2014 20:49 Go to previous message
Eclipse UserFriend
Sure. All statically defined components and properties are inherited (as you can see by the fact that the widgets all show up in the subclass).

If you embed Panel2 in another class as a custom component, it will show up with those components reversed as you wish.

At design time, however, the reverse() method means nothing and is ignored.
Previous Topic:SWT windowbuilder color not show on label etc only composite
Next Topic:Odd WindowBuilder SWT rendering
Goto Forum:
  


Current Time: Mon Jul 14 02:26:15 EDT 2025

Powered by FUDForum. Page generated in 0.07577 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top