Results 1 to 13 of 13
Thread: designing application in swing
- 08-26-2009, 10:37 PM #1
designing application in swing
my application looks like simple windows notepad application
where one menubar is there on top ..having several menus with menuitems like notepad has ,but my applicationm is not a text editor ..ok
if i click on any of this submenu, i want respective controls or different frames to appear below that menu bar .. or center of my application window .. i dont want a separate internal frame ..coz it is chaotic .. what i want is to change my GUI without removing that menubar .. and change between mwnuitems seamlessly .. if anyone can help or have any ideas .. reply .. sandeep_soni10@yahoo.com
-
1) As mentioned in the previous thread that you posted in: use a CardLayout if you want to swap JPanels or other components based on menu actions.
2) Please don't ask for email replies as that's not how this forum works. It is here to share questions and solutions with all.
Best of luck.
- 08-27-2009, 11:25 AM #3
Member
- Join Date
- Aug 2009
- Posts
- 16
- Rep Power
- 0
I think cardLayout will manage the problem.
Or you can try another way.
Try to return the panel/frame you want to the parent panel.
- 08-27-2009, 11:35 AM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Perhaps you just want a TabbbedPane?
- 08-27-2009, 06:51 PM #5
it sounds cool .. i tried the demo .. it looks good .. started coding .. lets see if it satisfies the need .. but tell me a thing can i add submenus to different tabs . and is it possible that each submenu's menuitems can display different panels when clicked.. if it goes good .. i will be done with my designing ..
Thanks .. plz reply this one.
- 08-27-2009, 09:14 PM #6
this way do not meet my needs ..coz i have submenus or menuitems in my main menus ..
and these submenus covers whole place in individual panels of each main menus ...
problem not solved .. suggest some other way ... night is short wen u r failing
- 08-27-2009, 09:27 PM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
We are back to when we started then.
How to use CardLayout.
- 08-27-2009, 10:22 PM #8
I might be speaking swing blasphemy but:
As an alternative to CardLayout, if you don't mind doing some/lot of extra work but get things exactly as you want them, you can try using null layout, setting the sizes and positions of the panels and setting "setVisible(...)" to hide and show things.My Hobby Project: LegacyClone
-
- 08-27-2009, 10:46 PM #10
- 08-28-2009, 08:15 AM #11
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
- 08-28-2009, 05:20 PM #12
wht does that mean ??
- 09-03-2009, 07:50 PM #13
anyways . after trying all stuffs the easiest way i came out with is -
1.declare as many panels u want .2>make separate function for each panel in which setLayout as u want to place different components....after that call this function in ur actionPerformed method.. so it finally worked on 29th august 2009 ,, but my
Net Conection was down .. so i was not able to post .. anyway cool..
Similar Threads
-
How can we use JCalender in Java Swing Application?
By makpandian in forum AWT / SwingReplies: 4Last Post: 03-06-2009, 09:08 AM -
deployment of swing application
By makpandian in forum AWT / SwingReplies: 1Last Post: 12-26-2008, 04:08 PM -
Swing Application Framework
By jurka in forum AWT / SwingReplies: 0Last Post: 10-09-2008, 06:01 PM -
advise on designing an ejb application
By bobD in forum New To JavaReplies: 0Last Post: 09-03-2008, 09:04 AM -
Patterns to application with swing and hibernate
By Peter in forum JDBCReplies: 2Last Post: 07-04-2007, 06:58 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks