Results 1 to 7 of 7
- 04-18-2011, 06:41 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 17
- Rep Power
- 0
- 04-18-2011, 07:32 AM #2
(Untested) Add a ComponentListener to the JSplitPane and set the divider location in componentResized(...).
db
- 04-18-2011, 09:50 AM #3
Member
- Join Date
- Mar 2011
- Posts
- 17
- Rep Power
- 0
- 04-18-2011, 01:59 PM #4
No. This is a forum, not a code mill. But I will guide you to a tutorial where you can learn about writing a ComponentListener.
How to Write a Component Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)
db
- 04-21-2011, 11:06 AM #5
Member
- Join Date
- Mar 2011
- Posts
- 17
- Rep Power
- 0
Please anyone can give me simple exaple ? I'm using NetBeans.
This is what i'm trying to do:
But it does not do anything and Divider stay same :( Pls helpJava Code:private void formWindowStateChanged(java.awt.event.WindowEvent evt) { // int w = Toolkit.getDefaultToolkit().getScreenSize().width; // int h = Toolkit.getDefaultToolkit().getScreenSize().height; if (evt.getNewState() == frmMain.MAXIMIZED_BOTH) // If maximize { jSplitPane5.setDividerLocation(250); } }
Thank youLast edited by michalss; 04-21-2011 at 11:32 AM.
- 04-21-2011, 12:30 PM #6
The visual designer you're apparently using isn't a beginners' tool, it's targeted at developers with considerable experience in coding Swing GUIs.
Learn how to code a Swing GUI, starting here: Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)
And please stop begging for code. I've already told you this isn't a code mill. We are happy to help less experienced people to learn to do things for themselves, but you have to put in that effort.
db
- 04-21-2011, 12:33 PM #7
Member
- Join Date
- Mar 2011
- Posts
- 17
- Rep Power
- 0
Last edited by michalss; 04-21-2011 at 12:39 PM.
Similar Threads
-
JFrame resize control
By babis in forum AWT / SwingReplies: 3Last Post: 08-24-2010, 07:50 AM -
need to copy file from one location to another location
By naveen.dpt2007 in forum New To JavaReplies: 4Last Post: 02-28-2010, 03:53 PM -
location provider returns no location
By sandeeprao.techno in forum CLDC and MIDPReplies: 0Last Post: 09-24-2009, 09:54 AM -
JFrame 's components size and location problem
By petrosgraf in forum Threads and SynchronizationReplies: 5Last Post: 04-18-2009, 02:24 AM -
how to place a divider of the splitpane?
By christina in forum New To JavaReplies: 1Last Post: 08-06-2007, 07:41 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks