divide frame

hello,

I want to create a frame which is divided vertically like the windows explorer in two piecies with a kind of separator and this separator should be movable to the right and to the left and so the right or the left space will be bigger or less. Is that possible to realize in Java?

pat

[310 byte] By [patrick270881a] at [2007-10-3 4:49:22]
# 1
Read the Swing tutorial. This section on [url http://java.sun.com/docs/books/tutorial/uiswing/components/components.html]Swing Components[/url] will have the component you are looking for.
camickra at 2007-7-14 22:53:52 > top of Java-index,Desktop,Core GUI APIs...
# 2

Hi,

Thank you very much! I wanted to test the two example for SplitPaneDemo on this site http://java.sun.com/docs/books/tutorial/uiswing/components/examples/index.html#SplitPaneDemo

I created a project in eclipse with the one demo class but it doesn't run becauseit always throws an error because it doesn't find the property file.

My structure looks as follows:

Projectname is SplitPaneProject and in this Project I have two folders src and bin, in the src folder is the SplitPaneDemo.java and in bin is the SplitPaneDemo.class.

Where do I have exactly place the property-file and the gif-images..? :(

pat

patrick270881a at 2007-7-14 22:53:52 > top of Java-index,Desktop,Core GUI APIs...
# 3
For a quick test put all files (source, class, images) in the same directory.
camickra at 2007-7-14 22:53:52 > top of Java-index,Desktop,Core GUI APIs...
# 4

Hello

I put the SplitPaneDemo.java, the SplitPaneDemo.class, the property.properties file and the gif-images all in one project folder, but I still get this error message:

Can't find the properties file that contains the image names.

Its name should be imagenames.properties, and it should

contain a single line that specifies one or more image

files to be found in a directory named images. Example:

images=Bird.gif Cat.gif Dog.gif

Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find bundle for base name imagenames, locale de_AT

at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)

at SplitPaneDemo.<init>(SplitPaneDemo.java:19)

at SplitPaneDemo.createAndShowGUI(SplitPaneDemo.java:139)

at SplitPaneDemo.access$0(SplitPaneDemo.java:134)

at SplitPaneDemo$1.run(SplitPaneDemo.java:152)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Do you eventually know how I can fix this problem? :(

pat

Message was edited by:

patrick270881

patrick270881a at 2007-7-14 22:53:52 > top of Java-index,Desktop,Core GUI APIs...
# 5

I worked for me. I called the file "imagenames.properties".

Although the first time I ran it I had misnamed the file and got this message. Notice how my locale is different.

java.util.MissingResourceException: Can't find bundle for base name imagenames, locale en_CA

If you are sure you named the file like I did above and you still have a problem, then it may be related to how ResourceBundles work. I've never used ResourceBundles before so I can't help you. Here is a link to the tutorial on [url http://java.sun.com/docs/books/tutorial/i18n/resbundle/concept.html]Using Resource Bundles[/url] that might help.

Of course the other option is to simply change the program and manually add the file name to the Vector.

camickra at 2007-7-14 22:53:52 > top of Java-index,Desktop,Core GUI APIs...