Results 1 to 7 of 7
- 08-22-2011, 06:16 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 27
- Rep Power
- 0
how to set a value from a Combobox after Clicking Ok button
Hi Everybody.
I am trying to make a GUI its have 4 combobox and each combobox have different string values. I am trying to create a Button("OK"). I need to pick some value from each combobox and then click ok button to make changes and exit. And also If I click cancel no changes. Please let me know to performed this action event.
Thanks
- 08-22-2011, 06:32 PM #2
Have you read the tutorials on How to Use Combo Boxes and How to Use Buttons (linked from the respective APIs)? Where are you stuck?
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
db
- 08-22-2011, 06:48 PM #3
Member
- Join Date
- Jul 2011
- Posts
- 27
- Rep Power
- 0
Yes I did, I already create Combobox and "OK" button I entered all the possible value but now I need to select the values from each combobox and after clicking Ok button then need to changed otherwise clicking Cancel no change made.
Thanks
- 08-22-2011, 07:07 PM #4
So, far we haven't the slightest clue what you imply by
So where's that SSCCE?need to changed otherwise clicking Cancel no change made
db
- 08-24-2011, 10:22 AM #5
You should clearly elaborate the problem first.
- 08-24-2011, 02:15 PM #6
Member
- Join Date
- Jul 2011
- Posts
- 27
- Rep Power
- 0
I am trying to Make a GUI. I do have 4 combobox.Each combobox have some value for example
Box one Box two same box 3 box 4. Now, I want pick a value from dropdown list and select
12 2 from each box. Then click ok button. After submit my ok button it has to
10 4 make changes and close the Frame. If , I open next time It has to show me
08 6 all the value I selected.Please if you have any clue about it please let me
06 8 know. Thank you gyes for your posting.
- 08-24-2011, 02:52 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
I was going to ask what those numbers were, but I see it's the example of what's in the drop downs.
(Just stuck code tags in there so I can see what's going on)
So you just want to remember between closing and reopening the JFrame the values for those combos?
Then stick them in a model that lives outside of the frame. When you open the frame then supply those saved values.
Similar Threads
-
Assigning text in JTable by clicking a button
By Aiquoc in forum New To JavaReplies: 3Last Post: 06-01-2011, 03:29 PM -
Creating a textfield on clicking toolbar button
By rohaniiitb in forum SWT / JFaceReplies: 0Last Post: 02-14-2011, 12:18 PM -
How to open new JFrame with clicking on button?
By phearless in forum AWT / SwingReplies: 1Last Post: 01-14-2011, 10:36 AM -
How to insert a row into JTable when clicking Add Button
By geekchick in forum New To JavaReplies: 3Last Post: 08-07-2010, 08:06 PM -
Get source web page after clicking next Button
By noob in forum New To JavaReplies: 1Last Post: 03-05-2010, 09:01 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks