checkboxes and radiobuttons in GUI forms

3 views
Skip to first unread message

Thomas Kellerer

unread,
Feb 22, 2010, 5:08:52 PM2/22/10
to architect-...@googlegroups.com
Hi,

I have a remark related to the way the Swing forms are created.

Controls like JCheckBox and JRadioButton are most of the time not created by passing a label in the constructor, but an additional JLabel is created in order to line up the controls and labels properly.

One problem with this approach is the way these controls behave. Normally you can click on the text of a checkbox or a radio button in order to toggle it. But when the corresponding label is not part of the component, this does not work and leads to a UI that is non-standard with reagrds to the rest of the system (at least on Windows, maybe it's different on other platforms)

Getting the radion buttons and checkboxes back to system-standard behaviour is maybe something you want to put on your roadmap...

Regards
Thomas

Jonathan Fuerth

unread,
Feb 22, 2010, 6:06:54 PM2/22/10
to architect-...@googlegroups.com
On Mon, Feb 22, 2010 at 5:08 PM, Thomas Kellerer <google...@sql-workbench.net> wrote:
Getting the radion buttons and checkboxes back to system-standard behaviour is maybe something you want to put on your roadmap...


Absolutely. Which forms are you thinking about? We'll change them right away.

The setup you describe (non-clickable labels) is certainly not an approach that I've been advocating. And to respond to your question, it's expected that the labels are clickable (and to the right of the checkbox or radio button) on Linux and OS X as well.

-Jonathan

Thomas Kellerer

unread,
Feb 22, 2010, 6:19:32 PM2/22/10
to architect-...@googlegroups.com
Hi Jonathan,

Jonathan Fuerth wrote on 23.02.2010 00:06:
> On Mon, Feb 22, 2010 at 5:08 PM, Thomas Kellerer
> <google...@sql-workbench.net

> <mailto:google...@sql-workbench.net>> wrote:
>
> Getting the radion buttons and checkboxes back to system-standard
> behaviour is maybe something you want to put on your roadmap...
>
>
> Absolutely. Which forms are you thinking about? We'll change them right
> away.
>

I thought there were several of them, but as far as I can tell it's only CompareDMPanel ;)

Regards
Thomas


Jonathan Fuerth

unread,
Feb 23, 2010, 12:44:16 PM2/23/10
to architect-...@googlegroups.com
On Mon, Feb 22, 2010 at 6:19 PM, Thomas Kellerer <google...@sql-workbench.net> wrote:

Absolutely. Which forms are you thinking about? We'll change them right
away.


I thought there were several of them, but as far as I can tell it's only CompareDMPanel ;)


Fixed in r3327. My initial plan was to change the layout, but that would be major surgery. As a workaround, I'm retargeting all mouse events from each label to its associated button.

On Mac OS X, the labels behave exactly as if they were part of the button (arming them then moving off the component does not activate them, but moving back over then releasing the button does, and so on). If you get a chance, please verify that it works properly on Windows too.

-Jonathan
 
Reply all
Reply to author
Forward
0 new messages