The Source for Java Technology Collaboration

Home » java.net Forums » Java Desktop Technologies » Swing & AWT

Thread: Java GUI

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Mar 4, 2008 12:28 AM by: Anthony Petrov
floetic

Posts: 11
Java GUI
Posted: Mar 2, 2008 8:18 PM
 
  Click to reply to this thread Reply

Hello All,

I would like to know is it possible to create an interface like this using Java? Shown at this link:

http://i71.photobucket.com/albums/i140/carpinate/DERSGUI.jpg

How would I go about coding the outside of the interface to be a rectangle with rounded corners?
Any useful websites or tutorials to help explain this?

Thanx,

~ Floetic ~

Anthony Petrov
Re: Java GUI
Posted: Mar 3, 2008 3:45 AM   in response to: floetic
  Click to reply to this thread Reply

Floetic,

On 03/03/2008 07:18 AM swing@javadesktop.org wrote:
> How would I go about coding the outside of the interface to be a rectangle with rounded corners?
> Any useful websites or tutorials to help explain this?
You might want to look at the following blog entry:
http://www.pushing-pixels.org/?p=260
It briefly describes the Shaped Windows feature introduced in the JDK
6.0u10.

--
best regards,
Anthony


floetic

Posts: 11
Re: Java GUI
Posted: Mar 3, 2008 1:48 PM   in response to: Anthony Petrov
 
  Click to reply to this thread Reply

I had a read through the link you suggested and thanks very useful. I tried running some code supplied there, I installed 6u10 build 12 but I keep getting this:

package com.sun.awt does not exist com.sun.awt.AWTUtilities.setWindowOpacity(w, 0.5f);

package com.sun.awt does not exist com.sun.awt.AWTUtilities.setWindowShape(w, new Ellipse2D.Double(0, 0, w.getWidth(), w.getHeight()));

Is there something I'm not doing to prevent this from happening?

Anthony Petrov
Re: Java GUI
Posted: Mar 4, 2008 12:28 AM   in response to: floetic
  Click to reply to this thread Reply


On 03/04/2008 12:48 AM swing@javadesktop.org wrote:
> I had a read through the link you suggested and thanks very useful. I tried running some code supplied there, I installed 6u10 build 12 but I keep getting this:
>
> package com.sun.awt does not exist com.sun.awt.AWTUtilities.setWindowOpacity(w, 0.5f);
>
> package com.sun.awt does not exist com.sun.awt.AWTUtilities.setWindowShape(w, new Ellipse2D.Double(0, 0, w.getWidth(), w.getHeight()));
>
> Is there something I'm not doing to prevent this from happening?
I guess you're compiling your code using an older JDK version. It won't
work because the com.sun.awt package has only appeared since the
JDK6u10b12, so older JDK versions simply have no idea about this
package. Try compiling your code using the javac supplied with the newly
installed JDK6u10b12, this should work.

--
best regards,
Anthony





 XML java.net RSS