Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:37 Go to next message
Phat Hong Chan is currently offline Phat Hong ChanFriend
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
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 125 times)
  • Attachment: 1.jpg
    (Size: 125.37KB, Downloaded 754 times)
  • Attachment: 2.jpg
    (Size: 204.42KB, Downloaded 591 times)
  • Attachment: Panel1.java
    (Size: 2.31KB, Downloaded 231 times)
Re: How to update GUI from Inherit Class [message #1396746 is a reply to message #1395194] Tue, 08 July 2014 18:22 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
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 22:39 Go to previous messageGo to next message
Guilherme Oliveira de Carvalho is currently offline Guilherme Oliveira de CarvalhoFriend
Messages: 1
Registered: July 2014
Junior Member
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] Sat, 12 July 2014 00:49 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
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: Wed Jul 15 06:15:30 GMT 2020

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

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

Back to the top