Swing Builder helps you create Swing GUI in a declarative and concise fashion. Like other Groovy builders, it uses tree based declarative syntax to create objects, handles the busywork of creating complex objects for you, such as instantiating children, calling Swing methods, and attaching these children to their parents.
Questions tagged [swingbuilder]
89 questions
2
votes
1 answer
Groovy Swingbuilder: How do I create dynamic menus
I'm creating a menu by reading a directory off the disk and creating a menuItem for each file in that directory.
I'd like to have it re-read the disk every time that menu is clicked.
SwingBuilder doesn't seem to want to do this-- at least not…

Bill K
- 62,186
- 18
- 105
- 157
2
votes
2 answers
Disabling toolbar from icePDF viewer
I am trying a sample with icePDF . Everything is working fine but i need to disable the toolbar which appears at the top. i tried few things but its not working. Can some body please help me out with it. Below is my code.
//package…

Vishal Thakur
- 141
- 4
- 16
2
votes
2 answers
Trying to understand GUI Swing and threads
I have the following application. It works, I am just trying to understand it better.
So from the main class I make the following call
public static void main(String[] args)
{
Gui gui = new Gui();
gui.startGui();
}
In the GUI Class
public…

alexis
- 1,022
- 3
- 16
- 44
2
votes
2 answers
Adding vertical separators in JToolBar
I have create a GUI using Java Swing (Windows Builder Pro) for a personal project and it has a JToolBar. I have added separators between the buttons in the tool bar.
JButton btnSave = new JButton("Save");
btnSave.setToolTipText("Save");
…

Deepak B
- 2,245
- 5
- 26
- 28
2
votes
1 answer
multiple instances of Swingbuilder?
I'm a little late to the Groovy party (like most other parties) and the documentation I've been able to find online about SwingBuilder is somewhat limited. I am trying to build a gaming application in Groovy (converting my current Java code to…

TroyB
- 195
- 1
- 14
1
vote
2 answers
Can @Bindable variable's change in different thread can be reflected the corresponding UI element?
I'm learning to implement a count down timer with GUI showing the time reduction. I'm using Groovy's @Bindable in the hope that the change of time reduction can be displayed automatically in the corresponding UI label.
The reduction of the…

Yu Shen
- 2,770
- 3
- 33
- 48
1
vote
1 answer
How do you pass constructor parameters using a builder like SwingBuilder?
I want to access JFrame(GraphicsConfiguration) using SwingBuilder.frame(), but I can't set it via the attributes, since it's unavailable. How do you pass constructor parameters using the Groovy Builders?
UPDATE: As requested, including the solution.…

Spencer Kormos
- 8,381
- 3
- 28
- 45
1
vote
1 answer
Create a Jdialog that has an icon just like joptionpane
I have a extended JDialog for a custom dialog because it's a bit complicated and I can't create it with JOptionPane but my issue is I still want to add to the JDialog the same icons that JOptionPane has to keep my dialogs similar in the entire app.…

Girl Codes
- 328
- 4
- 17
1
vote
3 answers
Groovy Swing buider fileChooser
I am trying to use groovy swing builder's fileChooser with no luck.
When I copy the following example from groovy website:
def openExcelDialog = SwingBuilder.fileChooser(dialogTitle:"Choose an excel file",
…

Arash
- 11,697
- 14
- 54
- 81
1
vote
1 answer
Groovy SwingBuilder : controlling the style of the tabs titles in JTabbedPane
I can't find a way (is there any ?) to format the style of tabs titles in a JTabbedPane.
I can change the background color of the tab panes (see below), but can't find a way to style the titles of the tabs; I would like to have them bold or red or…

Michel Parmentier
- 141
- 4
- 12
1
vote
1 answer
Groovy SwingBuilder bind to multiple properties
Is there a way to bind a properties to multiple properties of another object using the SwingBuilder? For example, I want to bind a button's enabled property to two text fields - the button is only enabled when both text fields are non empty.

Jeff Storey
- 56,312
- 72
- 233
- 406
1
vote
1 answer
WindowBuilder how to use a different button to display a counter
I have a program that i am creating in Windowbuilder using eclipse. I want the program to generate a random number and the user would have to guess if it's even or odd. I already created the game based on the command line, but what i'm trying to do…

Goku223344
- 35
- 7
1
vote
1 answer
How do I dispose a frame after few seconds of delay in Swing?
I want to dispose of my 1st frame with a delay of 2 to 3 seconds and then open another frame. I am able to dispose of a frame using dispose() methods but I want it to be delay at least 2 seconds. How do I do it?
Below is my login code to dispose of…

Shivani
- 63
- 9
1
vote
1 answer
IntelliJ GUI Form not appearing
I'm making a simple weather app using IntelliJ and built in form designer. I have made and designed a form and edited the bound class file accordingly. When I actually run the code, the form I designed does now show up at all, in fact just the last…

Sasank Ganapathiraju
- 135
- 2
- 9
1
vote
2 answers
Is it possible to combine Groovy's SwingBuilder with a Java JFrame subclass?
I am writing a Griffon/Groovy/Swing application. However, I do like using WYSIWYG GUI tools like Eclipe's WindowBuilder tool as well.
I am wondering if it is possible to combine the two approaches? I'd like to use SwingBuilder to manage view/model…

spierepf
- 2,774
- 2
- 30
- 52