Look & Feel doesn't stay??!

I have an JTree applet that I want to have the look and feel of the system that it's on.
In my case, I want it to have the Microsoft Windows look.
I have the following code, which works fine when I first bring up the browser, but if I hit refresh on the browser, it turns into the default look and feel.
What can I do to fix that??
//static initializer for setting look & feel
static {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
catch(Exception e) {
}

Put the code into your applet's init() method. When you initialize the L&F statically it only occurs once, when the class loads. What you need is to do this call each time the applet initializes...
Mitch Goldstein
Author, Hardcore JFC (Cambridge Univ Press)
[email protected]

Similar Messages

  • Setting Look & Feel - doesn't work for all components...

    Hi there.
    I'm setting the L&F in my application
    (UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());)
    For some strange reason two comboboxes still have the default L&F - all other components switch as expected.
    Anyone ever encountered such a problem?

    There is currently only one delegate distributed for the JSpinner class -- the BasicSpinnerUI class. Ideally, there would also be MetalSpinnerUI, WindowsSpinnerUI, and MotifSpinnerUI classes also available, but, until they are, JSpinner's are going to look the same regardless of the look and feel specified.
    I submitted this as a bug report to Sun several months ago and should be visible on the Bug Parade as bug 4449972.
    On the other hand, I have thought about writing my own delegates for this class. If you're interested in collaborating on such a project, let me know at [email protected]
    Shaun

  • Customizing ADF Faces Look & Feel. Some questions & suggestions

    Hi everybody,
    We are developing an application with ADF Faces using JHeadStart. For the moment, I am studying the way we must modify the JHS templates to adapt each element to our needs.
    As it's told in the JHeadStart Developer's Guide, there are two ways to customize Look & Feel:
    1) Modifying the templates
    2) ADF Skinning
    I'm using both methods, but I feel that thay are not good enough to adapt the L&F to our customer requirements.
    My main problem now is in the ADF Table customization. I want to use ADF Table because it offers us a lot of features that are not in the jsf table (the selection column, the table overflow...), and is very usefull combined with the generated JHS code. But at the same time, it doesn't offer a lot of functionality in the look & feel customization. Using JSF Table, I can set the CSS style for headers, rows, columns, the table, I can set the border, cellspacing and cellpadding. But I cannot do
    any of these thing (or at least, I don't see how) with the ADF Table.
    Our customer (a government) have a strict definition of the look & feel of his web applications. They want we use their CSS styles definition file, so they can modify at once the Look & Feel of all their applications. Modifying the L&F through skinning generate other styles, not use the style classes in our CSS (o so I think).
    So, the questions:
    1) There is any way to set the suitable styles for the ADF Table components (headers, rows)?
    1bis) Why, If I have defined a new skin, with only just a few selectors, some styles from oracle are applied? Maybe because the render kit in the 'adf-skins.xml' is "oracle.adf.desktop"? If it is true, how can I make that they are not used, I must implement a render kit or can I use another existent?
    2) Can I decide how looks the select column (for example a button instead of a radio button)? Can I decide where does it goes (right or left)?
    3) There is any way to hidden the text Show/Hide of the showDetail in the table (the tableOverflow), as I can change the icons through skinning? If it is not possible, How can I overwrite the text. I need it in Catalan, but it is shown in English for this locale. Where is the message bundle I should overwrite?
    4) There is any way to force a tree to start fully expanded?
    5) There is anywhere documentation about the javascript functions used in ADF and their meaning? I think for example in the previous question. If I knew which javascript function I should call for expand the tree and its parameters, I could put the call in the onload event of the body.
    6) I use a selectInputDate. I have skinned the launch-icon, and I would like to do a similar thing in the chooseDate that is opened in a new window. But It seems not to be affected for my skinning directives (if I put a chooseDate in the same page, its L&F follow the skinning rules I've defined). I don't know if this dialog is an ADF feature or a JHS generated feature.
    7) There is any way to keep unmodified the id I've choosed for a component? (I mean, an inputText with id="hello" in a form with id="form" will have in the HTML an id = "form:hello", but I would like it to be simply 'hello')
    8) How can I control the position and the size of a dialog (the chooseDate dialog or a dialog I've created)? In the cases I've been testing, it seems the dialog is forced to resize depending on the content. I would like to know if I can establish a fixed size.
    9) There is any way to open a non-modal dialog? (which I could keep open at the same time that another instance of the same dialog)
    For the moment, I think I have no more question. But give me time.... :-D
    The suggestion I've to do is basically more flexible components for a better customization (for example, the styles settings I've talked about previously). ADF components are nice and powerful, but I think they should generate pages that follow the tendencies in the web development: tableless pages (I cannot understand the utility of the objectSpacer existing the margins), use of CSS for layout...
    Any answer, comment or suggestion will be welcome.
    Carles.
    Message was edited by:
    cbios

    I have been able to make the UIX 2.2 and ADF Faces LAF look near identical by updating the oracle-desktop.xss file within UIX 2.2 as follows
    <!-- Change the accent color ramp to tan -->
    <style name="DarkAccentBackground">
    <!--<property name="background-color">#cccc99</property>-->
    <property name="background-color">#d2d8b0</property>
    </style>
    There are still some differences:
    1) A black line appears on the ADF Faces on the 'menu1' facet selected tab below the text. DON'T KNOW HOW TO REMOVE THIS FROM ADF Faces or add it to UIX 2.2!!!
    2) In UIX 2.2 a bulleted list uses the HTML <li> tag. In ADF Faces it doesn't use the HTML <li> tag rather it constructs the bulleted list using lower level HTML tags with the 'bullet' becoming an image, in my browser this means the disc is smaller in Faces. The motivation for this change I think is explained via this post. Since I have no control over how this specific HTML tag is rendered it forces me to replace the /adf/images/bltdscn.gif file in adf-faces-impl.jar with a larger disc!
    http://www.thescripts.com/forum/thread96839.html
    May update this again if there are other things I notice.

  • Changing shell, look & feel dynamically in desktop backing file

    (I apologize if this post is showing up twice - I tried posting with
    google groups but it doesn't appear at forums.bea.com, so I wanted to
    post again using xnews to make sure it shows up.)
    I have a backing file that I am using with my desktop and I need to be
    able to change the shell and look & feel dynamically, based on the page
    that is currently active. I am doing the following in the preRender()
    method:
    String newLAF = "myLookAndFeel";
    String newShell = "myShell";
    // here is where I would determine the appropriate LAF and shell based on the current page
    customizationContext = new CustomizationContext(Locale.getDefault(), request);
    customizationContext.setVisitorMode(true);
    DesktopView desktopView =
    PortalBeanManager.getPortalCustomizationManager().getDesktopView(customizationContext, webAppName, new PortalPath(portalPath), new DesktopPath(desktopPath));
    DesktopInstanceId dii = desktopView.getDesktopInstanceId();
    DesktopInstance di = PortalBeanManager.getPortalCustomizationManager().getDesktopInstance(customizationContext, dii);
    LookAndFeelDefinitionId lookAndFeelId = null;
    for(int i = 0, n = lookAndFeelDefinitions.length; i < n; i++) {
    if(newLAF.equals(lookAndFeelDefinitions.getDefinitionLabel())) {
    lookAndFeelId = lookAndFeelDefinitions[i].getLookAndFeelDefinitionId();
    break;
    di.setLookAndFeelDefinitionId(lookAndFeelId);
    ShellDefinitionManager shellManager = PortalBeanManager.getShellDefinitionManager();
    ShellDefinitionId shellId = null;
    ShellDefinition[] shellDefinitions = getShellDefinitions(webAppName, request.getLocale(), request);
    for(int i = 0, n = shellDefinitions.length; i < n; i++) {
    String shellName = shellManager.getShellView(customizationContext, shellDefinitions[i].getShellDefinitionId()).getMarkupView().getMarkupDefinition().getName();
    if(newShell.equals(shellName)) {
    shellId = shellDefinitions[i].getShellDefinitionId();
    break;
    di.setShellDefinitionId(shellId);
    PortalBeanManager.getPortalCustomizationManager().updateDesktopInstance(customizationContext, di);
    This works just fine, but I once the portal renders itself in my
    browser, I usually have to refresh the page before the changes to the
    shell and look & feel are visible. I would like to do this in the
    init() method of the backing file but I do not know how to determine
    the current active page from within init.
    I would appreciate any help you all could give me in finding a solution
    so I do not have to refresh the page in order to see the shell and look
    & feel changes. Thanks in advance!
    Andy

    We essentially have 2 "portals" running inside 1 .portal file. We'd
    like to be able to use single sign on and entitlements to allow/restrict
    access to various parts of the 2 portals (where certain books are
    consider part of portal "A" and others part of portal "B"). If you are
    logged in as a super-user, you will be able to access everything. If
    you are logged in as user type "A" you can only access portal "A," and
    similarly for user type "B" and portal "B."
    Portals A and B have each have a distinct header, footer (i.e. shell),
    and look and feel (skeleton and skin). If a super-user is looking at
    portal A, the portal should have portal A's header, footer, and look and
    feel, and similarly for portal B.
    How would you recommend we accomplish this? Would it make more sense
    (and is it possible) to have the header and footer jsps determine what
    content to render based on the current book or page, and then use the
    code you suggested below to change the look and feel dynamically?
    Thanks,
    Andy
    jolleyc wrote:
    in order to pick up the changes for that request you will need to do a redirect back to the server (our login examples shwo you how to do this). this is because the control tree has already been retrieved from the database (so you need to go back and get a new version).
    I quick note: If you plan on doing this a lot this is quite a heavy process. if you just need to change the lookAndFeel on the fly you can look at the following ( i t think this is in the tutorial portal)
    A) Modify the shell to include a jsp and backing file
    <netuix:header>
    <netuix:jspContent backingFile="com.acme.DynamicLookAndFeelHeaderBacking" contentUri="/portlets/lookAndFeel/dynamicLookAndFeelHeader/dynamicLookAndFeelHeader.jsp"/>
    </netuix:header>
    B) backing file looks like
    public void init(HttpServletRequest request, HttpServletResponse response)
    // Get the session from the request
    HttpSession session = request.getSession();
    // Get the LookAndFeel object from the PrimaryTheme in the request
    LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
    if (request.getParameter("defaultButton") != null)
    session.setAttribute("skin", "default");
    if (request.getParameter("textButton") != null)
    session.setAttribute("skin", "text");
    if (request.getParameter("classicButton") != null)
    session.setAttribute("skin", "classic");
    String selectedSkin = (String) session.getAttribute("skin");
    if (selectedSkin != null)
    lookAndFeel.setSkin(selectedSkin);
    lookAndFeel.setSkeleton(selectedSkin);
    lookAndFeel.reinit();

  • Flash player doesn't stay maximized when muted

    I searched for this bug on the forums but every thread included a staff member saying "this is a known issue see this bug report" but that bug report got closed without getting fixed....
    Please fix this bug.
    When flash is fullscreen it stays maximized. However if I mute the video or stream it doesn't stay maximized.

    hello, please have a look at [[Flash 11.3 doesn't load video in Firefox]] & see if this article covers your problem

  • Doesn't Stay in Source List

    The nano doesn't stay in the iTunes source list, so I can only mess around with the settings while it's connected. With previous iPods the icon and options remained even when the iPod was disconnected. Am I missing an option box, or did they change something in iTunes 5?

    I remember this feature being available only for the iPod Shuffle, and not any of the other iPods.

  • I am having a hard time with a page that is working for everyone else. When I click on anything in the site I get a message that says "The page you were looking for doesn't exist."  This is happening on both my ipad 2 and my iphone 5. I cleared my cache

    When I click on anything in the site I get the message " The page you were looking for doesn't exist."  This website works for everyone else, but not on my iPad 2 or iPhone 5. I cleared my cache and history on the iPad, but it still isn't working.

    I live in Germany and my credit card is in my native country of Holland .. then it
    doesn't accept my credit card.
    Your first statement explains the second statement. To use the German iTunes Store, you need to prove that you're a resident of Germany (that is required by the content owners who will not allow cross-border sales) and the only way Apple can provide such a verification is by requiring that you enter in either a German credit card or a German-purchased iTunes prepaid card. Since I presume the former is not a possibility, you'll need to do the latter if you wish to purchase content from the iTunes Store. Again, this is not Apple's choice but is forced on them by the content owners as a requirement for Apple being allowed to sell the content. The EU is working on regulations that would force the content owners to allow access pan-EU, but that's still in the works.
    You do not need an iTunes Store account to activate and run your iPad, though; at least, I didn't need one for either of my two iPads. If you only want to set up an account so you can get free iPad apps, take a look here:
    http://support.apple.com/kb/HT2534
    Read the steps carefully as the order in which you follow them is apparently critical. This seems to come and go, or only apply to App Stores in specific countries, so you may not see the option for "None" when asked for a payment type.
    As to the German iTunes Store in English, you can comment to Apple on that via their feedback pages:
    http://www.apple.com/feedback
    Regards.
    P.S. Regarding "this is the only place for a complaint and that will no doubt get removed because
    I'm not full of happy joy sparkles.
    As stated in the terms of use to which we all agreed, this isn't a complaint forum, it's a technical support forum. You don't have to be full of "happy joy sparkles", but posts that are nothing but complaints may indeed be removed. If you want to complain to Apple, use the feedback pages.
    Message was edited by: Dave Sawyer

  • Safari doesn't stay open

    I'm having the same problem, but can't execute any Safari menu options because it doesn't stay open long enough. Can't even Reset Safari.
    Installed 5.0 and it won't open. Continually get the "Reopen" window that sends a a report to Apple. The usual Safari window never gets beyond the URL line before it destructs. I backed up to ver 4.0.5 and get essentially the same result. It does however, try to populate the page, but stays in "Loading" mode for up to a minute or more and then disappears under the "Reopen" error window. I've done the Repair Permissions step with no improvement. Whatever ver 5.0 brought with it has poisoned all previous versions also.

    HI,
    As I suggested to Blake, better to start your own topic. Follow the instructions here...
    http://discussions.apple.com/help.jspa#postquestion
    Carolyn
    null

  • Setting Themes for Java Look & Feel

    Hi All,
    I am tring to set my customized theme to Java Look & Feel. I am able to set the theme using the following code:
    ASC_WhiteSatin theme = new ASC_WhiteSatin();
    MetalLookAndFeel.setCurrentTheme(theme);
    The above code works fine and changes the color schemes correctly.
    If I set another theme after setting the previous one i.e.let say abc Theme, dialogs and frames are updated properly where as JFileChooser start showing combination of both. Why?
    I am also updating the Look & Feel and calling
    SwingUtilities.updateComponentTreeUI(this);
    SwingUtilities.updateComponentTreeUI(this.getParent());
    ((JFrame)this.getParent()).pack();
    to refresh the themes for my frame. I am using JDK 1.4.1.
    Thanks in advance
    Wahaj

    try the beta-version of 1.4.2

  • Changing Look & Feel of Detailed Navigation

    Hi Gurus
    I want to change Look & feel (e.g. font size, font type, background color etc) of Detailed Navigation in portal.
    Please can anyone let me know which PAR file or files I need to modify for that?
    Thanks,
    Vaibhav Srivastava

    hi Vibhav,
    I think the below article will help you to get the exact par file, how to modify and see the changes in portal.
    -it is my own article:)
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60caa539-8e51-2a10-0e83-e0a68ab3f5aa|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60caa539-8e51-2a10-0e83-e0a68ab3f5aa]

  • [solved] How-To apply lxappearance Look&Feel for qpdfview?

    Hello,
    as the title says: I wonder if there is a way to get the configured lxappearance Look & Feel for the qpdfview pdf-viewer.
    I'd also write some code if necessary but I'm don't know where I should start…
    Help is as always appreciated. :-)
    Thanks in advance!
    Cheers,
    domac
    Last edited by domac (2012-08-16 16:29:29)

    Hello!
    You just need to install "libgnomeui". This package (or some of it dependencies... I never "investigated" what exactly happens) provides what is necessary to make Qt applications use the GTK theme. Probably it is going to work right after the installation. If not, try to logoff/login or restart the computer. And, as a "last resort" (it should not be necessary), change the Qt settings, on "qtconfig", to make it use the GTK+ Gui Style.
    I hope this have worked. Anything else, just ask!

  • How to standardize the look & feel of different vendor JSF components?

    Hi,
    There are various JSF components created by different parties. For example, Tomahawk from Myfaces, ADF faces from Oracle, SUN components that provided in Java Studio creator. They look different.
    Can we standard the look and feel for these various components when we use them in a same project? so that it wouldn't look that different when the page is displayed to the end user.
    Please advise.
    Thank you.

    Hi,
    Can you be more specific how to achieve that using css? You mean the look and fee that we see is not an image?
    Have you seen how Oracle ADF face look & feel is like?
    How to change its look to what we have SUN offered in its Java studio creator 2?
    Please advise.
    Thank you.

  • How to show different Look & Feel to different users?

    Hi,
    how to show different Look & Feel to different users?
    Thanks & Regards,
    Venu--

    If you want the user to select then LookAndFeel then Visitor Tools.
    If you want to use code and dynamically change it then http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/index.html?com/bea/netuix/laf/PortalLookAndFeel.html
    if you have only a few combinations then you could even create different desktops and direct the user to the appropriate url

  • Oracle Forms Look & Feel

    I want to change my forms look & fell thats why I performs below mention steps.But when form run the look & feel naver change only visual attribute of emp block becomes purple & when i change color then its not change means always remains purple.
    Steps Performed.
    1) My Forms install on C:\Oracle\Dmhome10g Direcotry.
    2) I am using Oracle JINITIATOR 1.3.1.17
    3) I am using JRE 1.4.2.17.
    4) My Os Platform Is Windows Advance Server 2000.
    5) I put Laf.Jar file in C:\Oracle\Dmhome10g\Forms90\Java.
    6) I open formsweb.cfg file & put archive=frmall.jar,laf.jar
    When I run the form then emp block visual attribute becomes purple & other theme remains defult no other changes performed. And when I change color then no action happened.
    I had 1 question in my mind.
    1) Where I put "DrawLAF.java" file.
    Regards
    Fahed Akhter

    Fahed,
    I'm not sure we are talking about the same thing. I am speaking about the Java console opened when you run your form (the little coffe-cup icon in the quick task bar) that should show something like this:
    Java Plug-in 1.5.0_12
    Utilisation de la version JRE 1.5.0_12 Java HotSpot(TM) Client VM
    Répertoire d'accueil de l'utilisateur = C:\Documents and Settings\Francois
    c: effacer la fenêtre de la console
    f: finaliser les objets de la file d'attente de finalisation
    g: libérer la mémoire
    h: afficher ce message d'aide
    l: vider la liste des chargeurs de classes
    m: imprimer le relevé d'utilisation de la mémoire
    o: déclencher la consignation
    p: recharger la configuration du proxy
    q: masquer la console
    r: recharger la configuration des politiques
    s: vider les propriétés système et déploiement
    t: vider la liste des threads
    v: vider la pile des threads
    x: effacer le cache de chargeurs de classes
    0-5: fixer le niveau de traçage à <n>
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    La version Forms Applet est : 10.1.2.0
    Francois

  • I can't get Firefox 10.0 to recognize 1password 3.8.15. The extension doesn't stay as an add-on. Please help!

    I can't get Firefox 10.0 to recognize 1password 3.8.15. The extension doesn't stay as an add-on. Please help!

    1passowrd team released support for Firefox 10 already. Do an autometic update and check.See:
    * http://support.agilebits.com/discussions/1password-for-windows/487-firefox-100-doesnt-support-1password

Maybe you are looking for

  • R12: PO Print report not accepting custom layout

    Hi All, PO Print report is not picking up the custom layout in R12. We have developed a custom layour ( .rtf).It works fine when run as a concurrent program. But if we follow the standard navigations ( Inquire/View document ) generates the standard r

  • Change the color of background in iDVD?

    Folks, New to iDVD. Is there a method to change the color of the background in an iDVD theme? Or is the background really an "image"? Thanks!

  • How can I set the language when sending an e-mail with attachment - 'Html'?

    "Character Broken" I made an ALV program, and this convert to "HTML',  and send an e-mail with this. Used Process is: DATA: gt_abaplist LIKE TABLE OF abaplist,       gt_html LIKE TABLE OF w3html,       doc_chng LIKE sodocchgi1,       objpack LIKE TAB

  • Can't synch icloud with iPad or iPod

    I have Outlook 2010 set up on Windows 7 using icloud. Outlook synchs to icloud with calendas, contacts, and email. My iPad and iPod touch no longer synch these items. I get a constant rotating whatsit, but no synch on either mobile device. Also, in t

  • Jar files created in test server page

    Hey everyone, I have been trying to follow the steps listed at: http://e-docs.bea.com/wls/docs81/webserv/client.html#1070561 to create a client jar. I was trying to use the jars created when you test the server code by running the webpage and d/l the