Solved

Windows UI

Posted on 2002-03-20
9
293 Views
Last Modified: 2010-03-31
Can I change the way a java frame looks? Specifically, I want to create a frame with curved edges and don't want the title bar color to be blue( you know such things ). I basically want to access the windows UI from java. Can I do that? If so, how?
0
Comment
Question by:maggari
9 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 6884135
You can't modify how the JFrame frame looks, it's handled by the OS.
To do what you want you'd have to create your own component, and handle all the painting and event handling yourself.
0
 
LVL 92

Expert Comment

by:objects
ID: 6884142
And I'm not even sure it is possible to create your own component to do this, but it sounds feasible (though a lot of work). And I don't think the OS will consider it to be a window.
0
 

Author Comment

by:maggari
ID: 6884649
If I cannot customize how a window looks in JAVA, is it the same case with other languages.. say VC++ or VB. I think it can be done in some language, coz we see so many applications ( e.g RealOne player, winamp etc) which have the non default GUI look. Any ideas in other languages, if not in JAVA? Thanks for your response.
0
 
LVL 92

Expert Comment

by:objects
ID: 6884661
You'll probably need to go to native OS code, ie. C/C++.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 9

Expert Comment

by:Venci75
ID: 6884923
Check the new features of java 1.4
0
 

Expert Comment

by:0xDEADBEEF
ID: 6885156
Build your own Look And Feel. Base class is javax.swing.plaf.basic.BasicLookAndFeel. You activate your own Look-And-Feel using UIManager. For further information, rtfm. You can obtain a documentation at http://java.sun.com/j2se/1.4/download.html

Hope this helps.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 6885210
You could do a Window with no frame, and then draw your own frame onto it...  Just a panel at the top of the window, where you catch mouseDrags, and move the window about accordingly...  You can then draw whatever you want onto it, and it will look like a window...  You can't change the shape of the window though (this is OS specific), and the other side-effect is that the window does not appear on the task bar (in Windows), so it can be hard to switch back to your application...
0
 

Expert Comment

by:kianh
ID: 6885435
You can customize your own GUI in Java. But I think a lot of work you have to do.
You can derive your GUI class from Window or JWindow.
To design a GUI like winamp or other non basic GUI look, you can add your images on to your window and then handle mouse event, action event for these images.
Hope this help.
0
 

Author Comment

by:maggari
ID: 6889593
I never got a definite answer people. So I will give the points to the first person in the list.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now