Article View: borland.public.jbuilder.java.swing
Article #12635Re: JDK 1.2, javax.swing and JBuilder2 designer
From: Julian Monypenny
Date: Thu, 03 Dec 1998 00:00
Date: Thu, 03 Dec 1998 00:00
49 lines
2965 bytes
2965 bytes
Hello Cheryl, I'm using the following workround to get swing 1.1 beta3 to work with JBuilder2. Note, I'm using JBuilder2.01 with JDK 1.1.6 with swing, so I can't guarantee this will work with JDK 1.2. 1) Install swing 1.1 beta3 in a subdirectory called swing-1.1beta3 under jbuilder2. 2) Change your CLASSPATH and SWING_HOME environment variables to point to swingall.jar in the new subdirectory rather than the lib subdirectory. 3) In JBuilder, use Tools/Default Project Properties to add a library for Swing 1.1 beta3. Set the class path to swingall.jar (and the source path to src.zip) in swing-1.1beta3. Note, I haven't worked out how to set the doc path to get the HTML displayed. 4) Leave the default project library for swing set to the version supplied with JBuilder. 5) Design your application UIs using com.sun.java.swing. 6) When you are happy with your UI, verify that it will compile. 7) Now use File/Project Properties to remove the existing swing library, and add the new swing library. 8) Globally replace com.sun.java.swing with javax.swing. 9) Complete development in the source editor using javax.swing. DO NOT use the UI Designer from this point: changing to the UI Designer locks JBuilder, and forces you to close it with Task Manager. However, if you did a good job in step 5 you shouldn't have a problem hand-crafting the code you need. Don't worry if this seems like a bit of a nightmare - it is! But, it does let you use swing 1.1 beta3 inside JBuilder. I have found the extra work well worth the effort for two reasons: 1) 1.1 is well rounded and contains far fewer bugs than 1.0.1. For example, the page keys work in a JViewport or DefaultEditorKit. The arrow up and down keys work when selecting text in a JTextArea. 2) 1.1 is subtly different to 1.0.1. I've found that code that worked perfectly in 1.0.1 needs tweaking to work with 1.1. I think it's a good idea to start using 1.1 now and put 1.0.1 out to pasture. One word of warning. When I run swing 1.1 beta3 apps inside JBuilder they come up with the metal look and feel. When I run them from the Windows NT Start menu they come up correctly with the windows look and feel. With a bit of luck this response will prompt somebody to write in with a much more elegant solution. But until then you might like to try this workround. Regards, Julian Cheryl Marquis wrote in message <3666F14C.6627ED68@prb.net>...
Technical Details
Message-ID:
<7473v2$t7411@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3666F14C.6627ED68@prb.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a72b6edc6f2c6e91 X-Google-Attributes: gid111d45,public From: "Julian Monypenny" <jmonypenny@news400.com> Subject: Re: JDK 1.2, javax.swing and JBuilder2 designer Date: 1998/12/03 Message-ID: <7473v2$t7411@forums.borland.com> X-Deja-AN: 418395861 References: <3666F14C.6627ED68@prb.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing