Results 1 to 10 of 10
Thread: Look and Feel of GUI
- 04-21-2010, 08:26 AM #1
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
- 04-21-2010, 08:34 AM #2
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 04-21-2010, 09:50 AM #3
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
Thanks a lot for replying.
I saw the link and I already used
UIManager.setLookAndFeel(UIManager.getSystemLookAn dFeelClassName());
and
UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
but its not changed at all.
So can you please suggest me what else can be done.
- 04-21-2010, 11:02 AM #4
If you need further help then you need to create a Short, Self Contained, Correct Example (SSCCE)
that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 04-21-2010, 11:16 AM #5
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
The code is
import java.awt.event.*;
import java.io.File;
import javax.swing.*;
public class CurveFitting extends JFrame implements ActionListener, FocusListener{
/**
* @param args
*/
public CurveFitting() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
super("My GUI");
//code to add components
pack();
setVisible(true);
UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE);
}
p
public void actionPerformed(ActionEvent e) {
//to perfom some action
}
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
// TODO Auto-generated method stub
CurveFitting cf=new CurveFitting();
}
}
but its not changing the appearance at all.
- 04-21-2010, 11:28 AM #6
Doh, read the tutorial, especially the parts about how to set a look and feel after the GUI is visible, or when to set the L&F.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 04-21-2010, 11:45 AM #7
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
I saw and then I added the line
UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
And I'm not able to make out where I'm going wrong.
Give me some suggestion.
- 04-21-2010, 12:00 PM #8
read the tutorial, especially the parts about how to set a look and feel after the GUI is visible, or when to set the L&F.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 04-21-2010, 12:02 PM #9
Member
- Join Date
- Jul 2008
- Posts
- 62
- Rep Power
- 0
> I saw and then I added the line
> UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
> And I'm not able to make out where I'm going wrong.
> Give me some suggestion.
google
UIManager.setLookAndFeel
copy/paste/compile/run any of the numerous examples you'll find,
and if you can't work it out, seriously, apply to macdonalds
- 04-21-2010, 01:34 PM #10
Senior Member
- Join Date
- Apr 2010
- Location
- Belgrade, Serbia
- Posts
- 278
- Rep Power
- 4
MetalLookAndFeel is by default.I saw and then I added the line
UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
And I'm not able to make out where I'm going wrong.
Give me some suggestion.
try with some other look and feel, for example windows look and feel.
For example if you want Windows look and feel use this code:
Java Code:try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception e) { e.printStackTrace();
Similar Threads
-
About look and feel
By makpandian in forum AWT / SwingReplies: 6Last Post: 02-13-2009, 02:55 AM -
Look and Feel
By Stein in forum New To JavaReplies: 10Last Post: 10-03-2008, 04:07 AM -
A Look-and-feel switcher
By Java Tip in forum javax.swingReplies: 0Last Post: 06-26-2008, 07:45 PM -
Swing - Look and feel
By Java Tip in forum Java TipReplies: 0Last Post: 03-11-2008, 10:53 PM -
Look and Feel
By arun_kumar in forum AWT / SwingReplies: 1Last Post: 11-17-2007, 06:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks