Results 1 to 5 of 5
Thread: Again Interesting JButton Query
- 01-15-2010, 01:16 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 87
- Rep Power
- 0
Again Interesting JButton Query
See I am making a Dock and my dock items are basically JButtons
So to delete the Dock Item from my Dock i want to introduce a close button on each JButton
My query is
I want to add a Button in a JButton and at a particular location on that JButton
Eg:
JButton dockitem=new JButton("dockitem");
JButton close=new JButton("close");
Now i want to embed close in dockittem at right top corner so can anyone help me out :)
- 01-15-2010, 03:43 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,422
- Blog Entries
- 7
- Rep Power
- 17
Last edited by JosAH; 01-15-2010 at 05:20 PM.
- 01-15-2010, 04:03 PM #3
Senior Member
- Join Date
- Aug 2009
- Location
- Pittsburgh, PA
- Posts
- 282
- Rep Power
- 4
How about nesting both buttons into a JPanel. BorderLayout could work
- 01-16-2010, 03:27 AM #4
Member
- Join Date
- Jun 2008
- Posts
- 87
- Rep Power
- 0
well i tried to put the x button using panels but the GUI is not that cool is their any suggestion where can i put the close button for a particular button
-
Without seeing your code and images, I'm not sure how we can begin to make suggestions here. Consider posting an SSCCE so we can see and run what you've currently have.
Similar Threads
-
Interesting JButton Query
By ravjot28 in forum AWT / SwingReplies: 3Last Post: 01-14-2010, 04:54 PM -
Interesting CS problem. Need help.
By xtrmi in forum New To JavaReplies: 1Last Post: 05-02-2009, 03:51 AM -
Interesting Experiment
By uncommon in forum Advanced JavaReplies: 13Last Post: 12-20-2008, 11:30 PM -
Interesting topic in JComboBox
By success21061985 in forum NetBeansReplies: 0Last Post: 08-21-2008, 12:43 PM -
Tricky but very interesting problem
By ravjot28 in forum New To JavaReplies: 4Last Post: 06-26-2008, 01:43 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks