Setting Look and Feel gives error

Hi,
I get error when I use,
JFrame.setDefaultLookAndFeelDecorated(true);
cannot resolve symbol
symbol: method setDefaultLookAndFeelDecorated (boolean)
location : class javax.swing.JFrame
     JFrame.setDefaultLookAndFeelDecorated(true);
     ^
1 error
I am running the example for JFrame in the site . PLease help!!

Hi,
that was solved!
thank u 4 ur time!
Do you know how to use aqua look and feel??
I have downloaded the files. demo.bat works fine! and I tested Aqua by editing demo.bat, but how to use it i nmy program?? what is the name to be given for setLookAndFeel(??)

Similar Messages

  • Problem setting look and feel

    It seems like I'm not able to change the windows xp look and feel, I'm using this code to change it but nothing happens, the window comes out with windows LAF:
    " public static void main(String[] args)
    try {
    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception e) { System.out.println(e.getMessage()); }
    new Ventana();
    Maybe... Am I missing some code? or a specific class needs to be downloaded?
    I'd apreciate any help

    That was not the problem, but thank you...
    I finally noticed the problem, what I was trying to do was actually done by writting this:
    JComponent.setDefaultLookAndFeelDecorated(true);
    Sets the OceanTheme feel on, but I noticed that when you try to use it with a Jdialog and a JFileChooser you get some ugly colors. Orange/Brown with JDialogs and Green with JFileChoosers. Is this a bug or it's ment to do that?
    Does somebody know how to fix it?
    Thanks for your support

  • How come setting look and feel not successful

    class gameble{
    public static void main(String argv[])throws Throwable{
    try {
    UIManager.setLookAndFeel(
    UIManager.getCrossPlatformLookAndFeelClassName());
    } catch (Exception e) { }
    console cs = new console();
    cs.addWindowListener(new GenericWindowListener(cs.tv));
    cs.setLocation(320,0);
    cs.show();
    with the above codes, i want java look&feel, but it still shows me window look & feel. need your help!!

    CroosPlatformLookAndFeelClassName looks almost exactly like the java default look and feel.
    You can try other L&F like:
    try{
    UIManager.setLookAndFeel(getSystemLookAndFeelClassName());
    //this will take the look and feel of the OS you are working with
    catch(Exception e){
    System.err.println(e.getMessage());
    or
    try{
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotiveLookAndFeel");
    //this will take the look and feel of the Unix OS
    catch(Exception e){
    System.err.println(e.getMessage());

  • Setting Look and Feel in Netbeans 4.1

    I'm trying to change my program's Look&Feel to the XP Look&Feel, but I can't find any way to change the post-init code for a JFrame. Surely this is possible, but the Code tab for JFrames is very limited and for the life of me I can't find any other way to customize the initialization of one.
    How would one go about doing this?
    Thanks,
    Jick

    Well, I managed to solve my own problem. For reference, I'll explain the process.
    My searches involved looking through the NetBeans interface to change the proper implementation code, but this was actually not necessary. NetBeans' code is very strictly protected by its code-locking mechanism, but the right place to insert the code to change the UI is immediately before the initComponents() method call in your JFrame's constructor.
    Example:
    public class SmartMoverGUI extends javax.swing.JFrame {
    public SmartMoverGUI() {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch(Exception e) {}
    initComponents();
    /* Rest of code below */
    Hope this helps someone. :)

  • Can't set look and feel?

    It's been a while since I've done GUIs. I thought I followed all the instructions, but I just keep getting windows defaults:
    public class CVSCompare extends JFrame
      public CVSCompare()
      { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setJMenuBar(stdMenuBar());
      public static void main(String[] args)
        try
        { UIManager.setLookAndFeel(
            "javax.swing.plaf.metal.MetalLookAndFeel");
        } catch (Exception e) { }
        CVSCompare c = new CVSCompare();
        c.pack();
        c.show();
    }

    If there is a problem occuring when the L&F is set the following will show it......
    try    {
        UIManager.setLookAndFeel( "javax.swing.plaf.metal.MetalLookAndFeel");   
    catch (Exception e)
    e.printStackTrace();
    }if this doesn't show anything then you must be setting the L&F somewhere else later on...
    nes

  • Mapbuilder.jar: cannot initialize Look and Feel: null

    When I try to start mapbuilder using java -jar mapbuilder.jar it crashes:
    cannot initialize look and feel: null
    error: java.lang.NullPointerException
    Running under 64 bit Linux in a VNC session.
    Anyone else seen this?
    JAVA_HOME is set.

    Try to use a java32 bit version (minimum jre 1.5 or later) and to give the complete path, I don't know a lot of Linux.
    Cheers
    Nico
    Edited by: gerardnico on Aug 26, 2009 10:26 PM Add jre 1.5 or later

  • Windows XP Look and Feel

    Hi,
    When I use Windows XP style Look & Feel on Windows XP Title Bar and Scroll Bar disappears or the color is set to transparent.
    I set Look and Feel using:
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    Even I run SwingSet2 on Windows XP and set the Look & Feel to Windows XP Style the result is the same.
    Is there any recommendation about this?
    Thanks...

    I forgot to say that I am using Java SDK v1.4.2_4

  • Change in look and feel

    Hi
    After the Server has restarted the look and feel of the portal has been changed.
    could any one tell me what could be the problem for this change?
    regards
    ambicasony

    Ok,
    is it a bad looking look and feel, i mean do you think this look and feel contains error or is kind of bugged ?
    what i am trying to know, is if this new look and feel cames from a portal desktop change or if it is really a bug.
    Message was edited by:
            Fabien REVOL

  • Setting defaut look and feel under Gnome generates errors.

    We are migrating some of our developer machines to linux, and in the process we are testing in house applications to ensure that in program file locations are correct and that everything just works. Each of our applications set the default look and feel at startup, which hasn't been a problem until now. Errors are being generated, despite no apparent affect on the application or how the application looks. Commenting out the the line of code that sets default look and feel result in an application that looks exactly the same, but with no errors. Keeping the line commented isn't an option, since the applications look horrendous in a Windows environment w/o the Windows L&F.
    My question is: Since these errors have no apparent affect on the application, do we need to worry about them? Can they be safely ignored?
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());will generate errors during application lifetime, a snippet of the errors:
    (<unknown>:16565): Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkComboBoxEntry (need an instance of GtkEntry or of a subclass)
    (<unknown>:16565): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
    (<unknown>:16565): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed
    (<unknown>:16565): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

    It's a bug in jdk
    look here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6624717
    and vote for it

  • Setting the Brushed Metal look and feel for macs using Java.

    Hello,
    I am relatively new to Java and I am new to Mac-specific java stuff. Anyways, when I try to set the look and feel of my classes to the "apple.awt.brushMetalLook" look and feel, I am unable to. It works if I have System.setProperty("apple.awt.brushMetalLook", "true"); written before I create any swing component. This would be fine, except that means that it is impossible to extend any swing component, such as JFrame or JApplet. Is there a way around this?
    Thanks!

    This might answer your question:
    http://lists.apple.com/archives/Java-dev/2003/Apr/msg00829.html

  • Error While running Oracle Look and feel Template Form -  (LAF_TEMPLATE)

    Forms Version 10.1.2.3
    JRE version 1.6.0_30
    Operating System Windows XP
    I am trying to setup oracle look and feel project on my local machine.
    For that i upgraded forms to 10.1.2.3 then i also applied path no *9593176* (But not yet performed steps related to jacob and webutil).
    Problem : When i run Oracle look and feel template form it comes up with following error.*
    Forms Applet version is : 10.1.2.3
    Exception in thread "thread applet-oracle.forms.engine.Main-1" java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet;
         at oracle.forms.fd.DrawLAF.init(DrawLAF.java:285)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Hello,
    I have spent a lot of time to indicate wherever I could that you don't have to ask questions about the LAF on this forum. You have two other different locations, a dedicated email and a dedicated forum.
    At the first sight, it seems that you have not used the laf_10123.jar in your archive tag.
    Thank you,
    Francois

  • Look and feel resoures could not be found error message

    Hi all,
    We moved all the images,js and css files to apache.
    The entryes in the skin.xml file are below
    <ns:render-dependencies>
    <ns:html>
    <ns:links>
    <ns:search-path>
    <!-- <ns:path-element>/</ns:path-element> -->
    <ns:path-element>/intranet/static</ns:path-element>
    </ns:search-path>
    <ns:link href="/intranet/static/css/body.css" rel="stylesheet" type="text/css"/>
    <ns:link href="/intranet/static/css/book.css" rel="stylesheet" type="text/css"/>
    <ns:link href="/intranet/static/css/button.css" rel="stylesheet" type="text/css"/>
    <ns:link href="/intranet/static/css/form.css" rel="stylesheet" type="text/css"/>
    </ns:links>
    <ns:metas/>
    <ns:scripts>
    <ns:search-path>
    <!-- <ns:path-element>/</ns:path-element>
    <ns:path-element>../js</ns:path-element> -->
    <ns:path-element>/intranet/static</ns:path-element>
    </ns:search-path>
    <ns:script src="/intranet/static/js/util.js" type="text/javascript"/>
    <ns:script src="/intranet/static/js/skin.js" type="text/javascript"/>
    <ns:script src="/intranet/static/js/delete.js" type="text/javascript"/>
    </ns:scripts>
    </ns:html>
    I found the below error in logfiles
    <Feb 3, 2010 11:41:27 AM EST> <Error> <netuix> <BEA-423128> <The look and feel r
    esource at base path /intranet/static/js/util.js could not be found.>
    <Feb 3, 2010 11:41:27 AM EST> <Error> <netuix> <BEA-423128> <The look and feel r
    esource at base path /intranet/static/js/util.js could not be found.>
    <Feb 3, 2010 11:41:27 AM EST> <Error> <netuix> <BEA-423128> <The look and feel r
    esource at base path /intranet/static/js/skin.js could not be found.>
    <Feb 3, 2010 11:41:27 AM EST> <Error> <netuix> <BEA-423128> <The look and feel r
    esource at base path /intranet/static/js/skin.js could not be found.>
    <Feb 3, 2010 11:41:27 AM EST> <Error> <netuix> <BEA-423128> <The look and feel r
    esource at base path /intranet/static/js/delete.js could not be found.>
    first it is looking into the web root and it is going to static root.
    Thanks,
    Venkata sarvabatla

    simplest is revert all the changes you made to what it was when you only had portal.
    Lets say your webapp had context /webapp and your site was accessed as
    http://yourserver/webapp. Lets say the images were under
    http://yourserver/webapp/framework/skins/yourskin/images/abc.jpg and so on for js/css.
    Then you added an apache and configured it to point to your weblogic for all requests (code and static).
    Now copy all the static files from your weblogic (via your build process) /webapp/framework/* to the same directory structure under apaches docroot so that
    <APACHEDOCROOT>/webapp/framework/skins/yourskin/images/abc.jpg is a valid path. Add a rule in Apache which states that /webapp/framework/* is served from apache (or you can say all .jpg,.css,.js is served from apache) and this rule should take precedence over the rule which says /webapp/* goes to weblogic.
    I dont know the exact details on apache , but I presume your apache admin will know. verify by adding a new dummy image file only on apache and access it over the browser. If you get it , then it means your apache is configured correctly, if you get a 404 it means your apache is still forwarding to weblogic.
    This has the advantage that developers can work locally without any change because all the paths are the same with or without apache so the site will work the same way on a local desktop as it would with apache.

  • How to give BSP Iview look and feel of portal??

    Hi All,
    I've created a BSP application that I use to create an Iview for portal.
    I thought that if i used htmlb tags that the look and feel of portal would be automatic to my app but its not.
    I've tried assigning portal css classes to a html table but there's no effect.
    I've previewed one of the standard ivews and viewed the source and found the path of the css file.  But when i looked for it on the server, while the out folder was there (com.sap.portal.design.portaldesigndata) , there was no css files in this folder.
    So i'm at a loss.  In summary, how do i get my bsp app to have the portal look and feel?????  I would prefer to use the css files so that if any changes are made to the standard, the changes will be reflected in my custom iviews too.
    Any help, would be most welcome,
    Liz.

    Hi Liz,
    on the properties tab for the BSP application try selecting the "Supports Portal Integration" checkbox.
    Cheers
    Graham Robbo

  • Having trouble setting the look and feel

    hi, i've almost finished my app and am trying to improve it's appearance. I'm trying to change the look and feel but i can't seem to get any changes to take effect. i've been reading through the tutorial on L&F but obviously am not 'getting' something.
    At the moment all I'm trying to do, is to add the line below. I'm not totally sure where to put it though. I've tried putting it in the main method and nothing happens. I've also tried putting i the CreateandShowGUI() method and that doesn't seem to do anything either.
    Where should it go?
    try {
            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        } catch (Exception e) {
            System.err.println("Could not initialize java.awt Metal lnf");
        }

    Put it before you start assembling your GUI, ie. instantiating and adding components.
    Cheers
    DB

  • Give me Guidence on the Look and Feel

    Hi ,
    I created one custom Look and feel (CLAF) stylesheet(like., font color, types are changed) for my project requirements.
    Everything is working fine.but the problem is under Footer, global links are not visible and also no space between the copyright and Privacy statement. how i will resolve this problem. please help me on this.
    Regards,
    Chandra.

    Chandra,
    Have you used the "Customizing Look and Feel Administrator Responsibility" to create the new look and feel.
    That has some bugs.
    If you have followed the standard way of doing it, you can log a SR with support and ask.
    Please refer the following notes,
    Note 412718.1 - How To Change The Colour And Fonts Size In 11.5.10.2 Version
    Note 566578.1 - Change the look-and-feel of Oracle Applications Using
    CLAF(UI)
    This might help.
    Thanks.
    With Regards,
    Kali.
    OSSI.

Maybe you are looking for