Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2010, 12:53 AM
Member
 
Join Date: Jan 2010
Posts: 15
Rep Power: 0
sunolinu is on a distinguished road
Default can any one help me about this GUI ?
can any one help me about this GUI ?

i want create widow that have two part one left one at right

on the left panel i have some shape like fill circle and i have button and ...

i want when user click on fill circle at left panle then click on right panel

, exactly at just point fill circle be created and at right panle i whould be

able to animate those shape now :

i know i should use swing , awt , mouseListner and ...

but i should use what component for left panel ? such as : JPanel or JLayeredPane or ... ?
what i should to use component for right panel that i should be able to animate shape on it?
how i should get coordinate of point at right panel that mouse clicked?
and how create my shape that place at left panel on it?
thanks
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 02-09-2010, 04:49 PM
Senior Member
 
Join Date: Aug 2009
Location: Pittsburgh, PA
Posts: 265
Rep Power: 1
zweibieren is on a distinguished road
Default
For the left panel I would use a Box with JButtons in it.
For the right panel I would use a subclass of JPanel.
Each button adds an entry to a list of shapes and calls repaint() on the JPanel.
The JPanel subclass overrides the JPanel paintComponent() method.
The method travels the list and paints each shape appropriately.
A MouseListener attached to the JPanel subclass listens for mouse hits
and mosifies the location of the item most recently added to the list of shapes.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-11-2010, 02:04 AM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 969
Rep Power: 2
Steve11235 is on a distinguished road
Default
Start with a JSplitPane and add a JPanel to each. Add components to each JPanel. Look at Sun's Java Tutorial on Swing. Swing won't work if you don't do the basics correctly...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-12-2010, 07:25 AM
Member
 
Join Date: Jan 2010
Posts: 15
Rep Power: 0
sunolinu is on a distinguished road
Default
thanks all you
i try then come back
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +2. The time now is 01:25 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org