|
Replies:
3
-
Last Post:
Mar 4, 2008 12:28 AM
by: Anthony Petrov
|
|
|
|
|
|
|
Java GUI
Posted:
Mar 2, 2008 8:18 PM
|
|
|
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 ~
|
|
|
|
|
|
|
Re: Java GUI
Posted:
Mar 3, 2008 3:45 AM
in response to: floetic
|
|
|
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
|
|
|
|
|
|
|
|
Re: Java GUI
Posted:
Mar 3, 2008 1:48 PM
in response to: Anthony Petrov
|
|
|
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?
|
|
|
|
|
|
|
|
Re: Java GUI
Posted:
Mar 4, 2008 12:28 AM
in response to: floetic
|
|
|
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
|
|
|
|
|