Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How to useJFileChooser with WindowBuilder(JFileChooser with WindowBuilder)
How to useJFileChooser with WindowBuilder [message #1806053] Wed, 01 May 2019 16:12 Go to next message
Tony Esposito is currently offline Tony EspositoFriend
Messages: 2
Registered: May 2019
Junior Member
I have uploaded a custom component JFileChooser to the WindowBuilder palette and I want to use the desginer such that a button event brings up the file chooser.
When I try to drag-and-drop the file chooser into the Design pane I get the entire file chooser window. (see image and/or uploaded file)

index.php/fa/35431/0/

Any thoughts?

Re: How to useJFileChooser with WindowBuilder [message #1806485 is a reply to message #1806053] Thu, 09 May 2019 16:45 Go to previous messageGo to next message
Avi Abrami is currently offline Avi AbramiFriend
Messages: 25
Registered: May 2015
Junior Member
a button event brings up the file chooser
Then you want to add a button to your GUI, don't you? And add code that opens a JFileChooser when the button is pressed. So do you really need to add a JFileChooser to the GUI?
Re: How to useJFileChooser with WindowBuilder [message #1806497 is a reply to message #1806485] Thu, 09 May 2019 22:18 Go to previous messageGo to next message
Tony Esposito is currently offline Tony EspositoFriend
Messages: 2
Registered: May 2019
Junior Member
So from the palette I want to choose the JFileChooser and place it on top of a JButton?
I can code around this issue. Just would like to see how this is done in the WindowBuilder Designer.
Re: How to useJFileChooser with WindowBuilder [message #1806605 is a reply to message #1806497] Sat, 11 May 2019 13:39 Go to previous message
Avi Abrami is currently offline Avi AbramiFriend
Messages: 25
Registered: May 2015
Junior Member
Quote:
So from the palette I want to choose the JFileChooser and place it on top of a JButton?

No, you add a "JButton" to your GUI from the palette and then you add an "ActionListener" to the button and in the "actionPerformed()" method you open a "JFileChooser". Would you like me to post some sample code? Have you seen the tutorial entitled How to Use File Choosers ?
Previous Topic:JFrame not displaying for a user.
Next Topic:ContenPane smaller than JFrame
Goto Forum:
  


Current Time: Thu Apr 25 09:33:37 GMT 2024

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

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

Back to the top