473,395 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to set a different LooAndFeel?

People, how do I set a different LookAndFeel for may projects in Netbeans?

TIA,
Scirious.
Jun 16 '06 #1
5 8515
Scirious wrote:
People, how do I set a different LookAndFeel for may projects in Netbeans?

TIA,
Scirious.


If you mean the Netbeans IDE? You can do it presently two ways.

- Download the Substance laf as a external module.
http://www.netbeans.org/kb/50/substa...-and-feel.html
https://substance-netbeans.dev.java.net

- Pass a different LAF to Netbeans, when you execute it via a startup
command: -Dswing.defaultlaf=YourLafYouWantToUse
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jun 16 '06 #2
IchBin wrote:
Scirious wrote:
People, how do I set a different LookAndFeel for may projects in
Netbeans?

TIA,
Scirious.


If you mean the Netbeans IDE? You can do it presently two ways.

- Download the Substance laf as a external module.
http://www.netbeans.org/kb/50/substa...-and-feel.html
https://substance-netbeans.dev.java.net

- Pass a different LAF to Netbeans, when you execute it via a startup
command: -Dswing.defaultlaf=YourLafYouWantToUse


Sorry not sure if using the Java "-Dswing.defaultlaf=" works nowadays. I
use to use it to change the LAF of Netbeans.
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jun 16 '06 #3
Well, I dont't want to change the look of the IDE itself, but the look of
my applications. And, since Netbeans doesn't allow me to edit it's
generated code I don't know how to do it.
Jun 16 '06 #4
Scirious wrote:
Well, I dont't want to change the look of the IDE itself, but the look of
my applications. And, since Netbeans doesn't allow me to edit it's
generated code I don't know how to do it.


OK..here is Sun's tutorial "How to Set the Look and Feel":
http://java.sun.com/docs/books/tutor...misc/plaf.html

Or another:
http://www.apl.jhu.edu/~hall/java/Sw...orial-LAF.html
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jun 16 '06 #5
IchBin wrote:
Scirious wrote:
Well, I dont't want to change the look of the IDE itself, but the look
of my applications. And, since Netbeans doesn't allow me to edit it's
generated code I don't know how to do it.


OK..here is Sun's tutorial "How to Set the Look and Feel":
http://java.sun.com/docs/books/tutor...misc/plaf.html

Or another:
http://www.apl.jhu.edu/~hall/java/Sw...orial-LAF.html
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)


Just for the heck of it. I keep a utility method that handles all of the
LAF's I use:

public void setSwingLAF(JFrame frame, String targetTheme)
{
String method = new
Throwable().getStackTrace()[0].getMethodName() + ": ";
//
// Set the User Profile LAF
JBookMarksPrefs.setLaf(targetTheme);
try
{
if (targetTheme.equalsIgnoreCase(NATIVE))
{

UIManager.setLookAndFeel(UIManager.getSystemLookAn dFeelClassName());
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(KUNSTSTOFF))
{
UIManager.setLookAndFeel(new
com.incors.plaf.kunststoff.KunststoffLookAndFeel() );
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(JAVA))
{

UIManager.setLookAndFeel(UIManager.getCrossPlatfor mLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(MOTIF))
{

UIManager.setLookAndFeel("com.sun.java.swing.plaf. motif.MotifLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(METAL))
{

UIManager.setLookAndFeel("javax.swing.plaf.metal.M etalLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(GTK))
{

UIManager.setLookAndFeel("org.gtk.java.swing.plaf. gtk.GtkLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
} else if (targetTheme.equalsIgnoreCase(METOUIA))
{
UIManager.setLookAndFeel(new MetouiaLookAndFeel());
SwingUtilities.updateComponentTreeUI(frame);
return;
}
else if (targetTheme.equalsIgnoreCase(WINDOWSCLASSIC)){

UIManager.setLookAndFeel("com.sun.java.swing.plaf. windows.WindowsClassicLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
}
else if (targetTheme.equalsIgnoreCase(MACOSX_WRAP)){
System.setProperty("Quaqua.tabLayoutPolicy","wrap" );

UIManager.setLookAndFeel("ch.randelshofer.quaqua.Q uaquaLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
}
else if (targetTheme.equalsIgnoreCase(MACOSX_SCROLL)){
System.setProperty("Quaqua.tabLayoutPolicy","scrol l" );

UIManager.setLookAndFeel("ch.randelshofer.quaqua.Q uaquaLookAndFeel");
SwingUtilities.updateComponentTreeUI(frame);
return;
}
// Load the Goodies LAF Color
if (targetTheme.equalsIgnoreCase(BROWNSUGAR))
Plastic3DLookAndFeel.setMyCurrentTheme(new BrownSugar());
else if (targetTheme.equalsIgnoreCase(DARKSTAR))
Plastic3DLookAndFeel.setMyCurrentTheme(new DarkStar());
else if (targetTheme.equalsIgnoreCase(DESERTBLUE))
Plastic3DLookAndFeel.setMyCurrentTheme(new DesertBlue());
else if (targetTheme.equalsIgnoreCase(DESERTBLUER))
Plastic3DLookAndFeel.setMyCurrentTheme(new DesertBluer());
else if (targetTheme.equalsIgnoreCase(DESERTGREEN))
Plastic3DLookAndFeel.setMyCurrentTheme(new DesertGreen());
else if (targetTheme.equalsIgnoreCase(DESERTRED))
Plastic3DLookAndFeel.setMyCurrentTheme(new DesertRed());
else if (targetTheme.equalsIgnoreCase(DESERTYELLOW))
Plastic3DLookAndFeel.setMyCurrentTheme(new DesertYellow());
else if (targetTheme.equalsIgnoreCase(EXPERIENCEBLUE))
Plastic3DLookAndFeel.setMyCurrentTheme(new
ExperienceBlue());
else if (targetTheme.equalsIgnoreCase(EXPERIENCEGREEN))
Plastic3DLookAndFeel.setMyCurrentTheme(new
ExperienceGreen());
else if (targetTheme.equalsIgnoreCase(SILVER))
Plastic3DLookAndFeel.setMyCurrentTheme(new Silver());
else if (targetTheme.equalsIgnoreCase(SKYBLUE))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyBlue());
else if (targetTheme.equalsIgnoreCase(SKYBLUER))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyBluer());
else if (targetTheme.equalsIgnoreCase(SKYBLUERTAHOMA))
Plastic3DLookAndFeel.setMyCurrentTheme(new
SkyBluerTahoma());
else if (targetTheme.equalsIgnoreCase(SKYKRUPP))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyKrupp());
else if (targetTheme.equalsIgnoreCase(SKYPINK))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyPink());
else if (targetTheme.equalsIgnoreCase(SKYRED))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyRed());
else if (targetTheme.equalsIgnoreCase(SKYYELLOW))
Plastic3DLookAndFeel.setMyCurrentTheme(new SkyYellow());

// Load the Goodies LAF
Plastic3DLookAndFeel.setHighContrastFocusColorsEna bled(true);
UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
UIManager.put(com.jgoodies.plaf.Options.DEFAULT_IC ON_SIZE_KEY,
new Dimension(18, 18));
SwingUtilities.updateComponentTreeUI(frame);

} catch (Exception e)
{
Error.message("setSwingLAF",e);
}
}

Naturally, here are the hard codded vars:
final public String LOOK_AND_FEEL = "Look & Feel";
final public String GOODIES = "Goodies";

final public String NATIVE = "Native";
final public String JAVA = "Java";
final public String MOTIF = "Motif";
final public String METAL = "Metal";
final public String KUNSTSTOFF = "Kunststoff";
final public String METOUIA = "Metouia";
final public String WINDOWSCLASSIC = "WindowsClassic";
final public String GTK = "GTK";
final public String MACOSX = "Mac OS X";
final public String MACOSX_WRAP = "Wrap Tabs";
final public String MACOSX_SCROLL = "Scroll Tabs";

final public String BROWNSUGAR = "BrownSugar";
final public String DARKSTAR = "DarkStar";
final public String DESERTBLUE = "DesertBlue";
final public String DESERTBLUER = "DesertBluer";
final public String DESERTGREEN = "DesertGreen";
final public String DESERTRED = "DesertRed";
final public String DESERTYELLOW = "DesertYellow";
final public String EXPERIENCEBLUE = "ExperienceBlue";
final public String EXPERIENCEGREEN = "ExperienceGreen";
final public String SILVER = "Silver";
final public String SKYBLUE = "SkyBlue";
final public String SKYBLUER = "SkyBluer";
final public String SKYBLUERTAHOMA = "SkyBluerTahoma";
final public String SKYKRUPP = "SkyKrupp";
final public String SKYPINK = "SkyPink";
final public String SKYRED = "SkyRed";
final public String SKYYELLOW = "SkyYellow";

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jun 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Neil | last post by:
Folks, I've got a problem at work, and I'm hoping that someone out there may have had something similar (although I doubt it!) or may be able to offer some advice. I'm in the process of...
16
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style...
1
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? ...
5
by: Hendrik Schober | last post by:
Hi, we just run into the problem, that "default" alignment in the project properies dialog seem to be different. We have a project that's a DLL, which is linked with a couple of LIBs. All are...
3
by: asanford | last post by:
I want to create an ASP.NET web application that receives a form POST message, inspects the data, and reroutes the request to one of many different servers. I wrote an IHttpModule which...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
4
by: cantatahost | last post by:
Hello, Likely this has been asked before... We have a library (in DLL form) that we distribute. The interface to the library is all C, but within the library it uses C++ in many places. ...
3
by: Ryan Liu | last post by:
Hi, I have a big urgent problem to solve. I used to use Windows 2000 Chinese version, now I installed Windows XP (English) system. The problem is not about 2000 or XP, it is about English...
16
by: Stefano Sabatini | last post by:
Hi all, I'm facing this design problem. I have a table which defines the behaviour of an Object in a given state according to the type of event it is receiving. So for each couple...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.