margins for JButton

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

margins for JButton

Postby goldw » Mon Oct 25, 2010 5:01 am

The margins property was available on earlier versions of WB Pro for JButton. Now it has disappeared. Can I make it reappear?
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Mon Oct 25, 2010 6:01 am

The margins property is an advanced property.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: margins for JButton

Postby goldw » Mon Oct 25, 2010 11:26 pm

Thanks for your very prompt reply; I have found margin. Please can you tell me where the tab labels in JTabbedPane have gone?
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Tue Oct 26, 2010 7:24 am

They haven't "gone" anywhere. JTabbedPanes don't have tab labels.

The "title" is a property of the Tab itself.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: margins for JButton

Postby goldw » Wed Oct 27, 2010 12:03 am

Yes, but when you select a tab in Designer mode, in earlier versions the tab title was shown but now the property pane is blank even when you press the advanced button. The dialog was originally written in JBuilder. The tab titles are in the code as follows

Code: Select all
    jTabbedPane1.addTab("Refinement", null, getPnRefinement(), null);
    jTabbedPane1.addTab("Grid Sizes", null,    this.pnGridSize, null);
    jTabbedPane1.addTab("Layers", null, this.pnLayers, null);
    jTabbedPane1.addTab("Perfs/Fracs", null, this.pnPerforations, null);
    jTabbedPane1.addTab("Geology/Sat'ns etc.", null, getPnGeologyEtc(), null); // Moved to WBPro here
    jTabbedPane1.addTab("Remap etc.", null, getPanel_3(), null);

The old version is eclipse 3.4 and WBPro Version: 6.7.0. Current version is eclipse 3.6 and WBPro 8.0.0
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Wed Oct 27, 2010 5:15 am

Select the panel that represents the tab (either in the component tree or the design view) and expand its Tab property.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: margins for JButton

Postby goldw » Wed Oct 27, 2010 8:13 am

Thank you; found it. I hesitate to offer because I have enough trouble with my own bugs let alone yours, but you need someone like me to test and critique your code because I keep getting it wrong. Somebody who really understands it is the wrong sort of tester.
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Wed Oct 27, 2010 12:00 pm

Are you suggesting that the panel that creates the tab was not a obvious place to look for the Tab property?

It may be different from the old 6.x version, but that doesn't make it any more or less correct (or more or less obvious).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: margins for JButton

Postby goldw » Wed Oct 27, 2010 11:31 pm

If I find it difficult it is difficult.
There has been a change of mindset between versions and the user has to work this out for himself.
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Thu Oct 28, 2010 9:19 am

You are referring to a change that was made almost two years ago at this point. You are also the first to raise it as an issue.

The Tab itself is not actually a widget in the component hierarchy. The panel (or other widget) added to the JTabbedPane becomes a page in that JTabbedPane. The Tab is just an attribute of the panel/page so we show its properties accordingly.

It shouldn't take the typical user more than 10-20 seconds to find the Tab property the very first time (especially since it is listed almost at the top of the properties for the panel).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: margins for JButton

Postby goldw » Fri Oct 29, 2010 6:36 am

I acknowledge your comments. The earlier version was very stable and I was content to stick with it. Thank you for your help and patience.
goldw
 
Posts: 10
Joined: Mon Oct 11, 2010 12:57 am
Location: London, UK

Re: margins for JButton

Postby Eric Clayberg » Thu Nov 04, 2010 4:01 am

The current version is quite stable as well ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest

cron