I would like to overlay a text field on top of a button widget when
clicked but can't find out how to overlay SWT widgets. Does anyone
have any ideas?
Thanks in advance
Chris
> I would like to overlay a text field on top of a button widget when
> clicked but can't find out how to overlay SWT widgets. Does anyone
> have any ideas?
I don't understand "overlay" in this context.
Do you mean like a tooltip?
<http://www.java2s.com/Tutorial/Java/0280__SWT/Showatooltipinsidearectang
le.htm>
or perhaps a StackLayout?
http://www.java2s.com/Tutorial/Java/0280__SWT/2000__StackLayout.htm
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
Hi John
That's great. The StackLayout performed the desired functionality:
Which was basically just displaying a text field over a button when
clicked. Unfortunately in the end, due to the +ves and -ves I was
weighing up, I have chosen to go with SWING instead for this Sudoku
application. Will SWING's overlay layout perform the same required
functionality?
Thanks
p.s. Thankyou to John in particular for replying to a lot of my
questions I have had over the last few days, it hasn't gone unnoticed
John!
I don't really know, but I've seen excellent performance using Swing
with only minor effort. Swing has no StackLayout as such; it depends on
the goal. For text overlay, I'd use tool tips; for a two state control,
I'd extend JToggleButton. You might also look at CardLayout and
JTabbedPane. The SwingSet2 application is inspiring and the Swing
tutorial has a trove of interesting examples.