How to change the shape of JFrame in different shape , and also make it interface look alike Mac Windows Frame
Thanks…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can make the interface of a Java Swing application look “native” to the operating system it’s running on by additing the following lines to either your main method, the init method (if it’s an Applet) or to the constructor of your top-level JFrame:
Edit
UIManager.setLookAndFeel() can throw five different types of exception, documented here (assuming that you’re using Java 6). How to handle these exceptions is completely up to you – if you ignore them (as in my example, catching all Exceptions and then doing nothing) then your application will use the default Java look and feel. Maybe this isn’t a bad thing? Only you can decide.