Discussion of Weblog:  ABAP Look and Feel Service

<a href="/people/brian.mckellar/blog/2005/06/12/bsp-in-depth-abap-look-and-feel-service In-Depth: ABAP Look and Feel Service</a>
<i>The three minutes routine to change any SAP-blue theme to the new theme that is required for you next demo!</i>
If there should be any questions, comments, etc on this weblog, please post it here, so that it is easier to handle the traffic. We are also interested to see if anyone does actually use the tool.

Hiya,
I saw this blog posted a while back and have only now had a chance to use it - very cool work there Brian and Steffan!
The only thing is I'm having what looks like the same problem as Maximilian!
We're on 620 sp45.
Everything installed fine, I tweaked the mime version code for 620 (me->ifur_d2_system~css_version) and the left hand side of the screen, the editor itself, looks and works fine - but the preview screen doesn't work, the BSP is displayed with no theme at all.
I opened the BSP in a new page with default theme and set the theme manually with paramters and this doesn't work either.
i.e.
http://<host>:<port>/sap/bc/bsp/sap/it05/entrypoint.htm?sap-themeRoot=%2fsap%2fpublic%2fbc%2fur%2fdesign2002%2fthemes%2falfs1000202FFE4C43B2D1B7D674EDAA520565656
But if I try with an SAP standard theme everything works fine and the new theme is picked up correctly
i.e.
http://<host>:<port>/sap/bc/bsp/sap/it05/entrypoint.htm?sap-themeRoot=%2fsap%2fpublic%2fbc%2fur%2fdesign2002%2fthemes%2f~sap_standard
I've checked the URL encoding (using program BSP_DECODE_URL) and with the alfs theme this looks fine.
In the source code the stylesheets are referenced using the correct themeRoot i.e.
<link id="urstyle" rel="stylesheet" type="text/css" href="/sap/public/bc/ur/design2002/themes/alfs1000202FFE4C43B2D1B7D674EDAA520565656/ur/ur_ie6.css">
When I set a break point in the ALFS HTTP handler this is not picked up.
BUT the one really puzzling thing about all this is that whilst I've been trying to fix this and work out what is going wrong I've made small changes to the ALFS class, i.e. to change the default BSP application used in the editor, and sometimes after generating the class code, refereshing both browser and system caches, everything worked fine - even the debugging of the HTTP handler - for some generated themes - and then stopped working again!
Now I know how this reads - and I've worked with enough users in my time to know you must be thinking - well she must have changed something! But I really can't work out what it could have been.
I've been round and round trying to reproduce what ever it was to get this working.
I've tried all the following in various combinations:
- restarting ICM
- removing ALFS HTTP handler from ICF service
- starting with a completely new copy of the class
- adding alert statements to the ALFS editor page to track themeRoot values
- changing the code relating to me->ifur_d2_systemcss_version and me->ifur_d2_systemur_version so that there is a version number (tried 'urversion=DAT<date>' and plain 'DAT<date>'), changed the code so there is no version number used at all.
- even (don't laugh!) put the ALFS HTTP handler on node SAP/BS/BSP just to make sure the external debugger was still working (it was). At this point I could see each time it was called, and since each call did not have the alfs string in it, all the internal class processing was correctly skipped.
All of the above in combination with cache refreshing on both server and brower side and logging on/off.... and still feel no closer to resolving this.
From what I understand, the ALFS HTTP handler is called everytime a MIME or theme object is requested from the theme root - as this is the only time that a request would pass via SAP/PUBLIC/BC/UR. And I understand that if the requested object is already cached, there will be no request passing via this node, so the ALFS HTTP handler won't be called - but think that there must be some important point relating to caching that I must have missed ...
So that's my first question... help!
Also, Brian, what you have mentioned before, this patch you have to take a theme, patch it with ALFS then import it into the theme editor - this sounds like exactly what we need to do ... I couldn't see any weblogs relating to this - so could you point me in the right direction??
We have no portal so I'll be trying the standalong theme editor plug in for Eclipse.
Thanks in advance,
Cathy

Similar Messages

  • How to get the weblogic's look and feel?

    Have you seen the look and feel of weblogic's 7.0 (or 8.0) workshop.
    It's very beautiful!
    I want to make a skin like that, then I can skin my application use the
    pretty skin, but i can not get the theme of workshop, how can i make it?
    reference: www.javootoo.com www.l2fprod.com

    I beleive 1.4.2 has an automatic upgrade feature that will upgrade people to 1.5 once it is released. The problem is that even though java.sun.com has released 1.5, www.java.com has not, which is where the average person will get Java from.
    Another option is to make a custom ButtonUI (other componenets too if u wish) that will use a Gradient to make those 3D looking buttons. If you dig through the Java source, you will see it.
    As far as old projects having this look, as soon as 1.5 is on www.java.com, most people will automatically upgrade to it assuming they are running XP.

  • WebDynPro ABAP iViews not picking the portal look and feel

    Hi,
    In our case , WebDynPro ABAP iViews not picking the portal look and feel.
    Is there any way to provide the custom developed portal theme link or css file to the WebDynPro application.
    Can it be done programmatically in the WD ABAP application.
    Best Regards
    Sid

    Look at the below link, it will answer your question:
    Re: EP 7 Portal stylesheet with WD ABAP
    Raja T

  • Non-sap screen look and feel in webdynpro abap

    Dear Experts,
    I have a Webdynpro ABAP application which is fetching data from LFA1 and LFB1.
    My client wants a non-sap look and feel onto the screen, he doesnt want the SAP Color and all.
    How can i achieve this to look it commercial ??
    Please suggest.
    Regards,
    Mamai.

    Hi Mamai,
    WDA,maintain two parameters WDFORCEEXTERNALSTYLESHEET = 'X' and WDTHEMEROOT = 'CustomerThemes".
    for ur application , add the parameter sap-ep-themeroot=/SAP/PUBLIC/BC/UR/NW5/THEMES/MYCUSTOMTHEME to ur application URL , where MYCUSTOMTHEME is the theme u have created under the path /SAP/PUBLIC/BC/UR/NW5/THEMES/ in ur system.
    Please go through this..
    http://help.sap.com/saphelp_nw70/helpdata/en/7b/fb57412df8091de10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/46/89af7fbe4d429ee10000000a1553f7/content.htm
    and for custome theme..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8?quicklink=index&overridelayout=true
    Re: Custome theme or stylesheet for one WD Application
    stylesheets..
    http://help.sap.com/SAPhelp_nw73/helpdata/en/47/af752005c92fe1e10000000a42189d/content.htm
    Cheers,
    Kris.
    Edited by: kissnas on Apr 21, 2011 6:44 AM

  • Look and feel of self-service pages under Oracle Applications Manager (OAM)

    Hi All,
    After applying patches for upgrading the HRMS module from 12.1.3 to 12.1.5, look and feel of self-service pages under Oracle Applications Manager (OAM) changed means Buttons not appearing in proper manner. and look of pages are not in proper manner. This is happening for OAM self-service pages only.
    Current HRMS patchset level : r12.hr_pf.b.delta.5
    OS : RHEL 5.3 x86_64
    Any idea please....
    Thanks inadvance,
    Regards,
    900076.

    You need to ask your DBA to delete the cached stylesheets in /OA_HTML/cabo/styles/cache/...
    You will also need to delete your temporary internet files.
    Once both and deleted, re-access the page and you will see the updated stylesheets.
    (Note: individual users may need to delete their temporary internet files too else they will see an old version cached on their computer)
    Explanation: In new releases Oracle may introduce new additional OAF components. Each OAF component is assigned a shortcode/id by browsers in alphabetical order and a stylesheet generated.
    If a new item is introduced, the shortcode/ids will change. However if an old version of the stylesheet still exists it will apply the wrong style to the wrong component.

  • Weblogic Workshop GUI look and feel

    Hi all,
    Does anyone know where I can find a library to import a similar look and feel that this application has? It's quite impressive for a java gui!
    Thanks for your help.//

    After a bit of peliminary swing hacking...
    overide javax.swing.plaf.metal.MetalTitlePane.SystemMenuBar.createActions() to return a subclass of the exisiting Maximise action that sets to corrected dimensions.
    subclass createTitlePane in MetalRootPaneUI to return your new class
    then set the metal UI to use your new new RootPaneUI and stand back and feel smug!
    I don't need to do this, but this should work!
    HOWEVER... exactly how you decode where on teh screen the taskbar starts/ends is anybody's guess.

  • BSP - Look and Feel / Theme

    Good Morning All,
    disclaimer: I checked the blogs, I checked the discussions, I checked the examples, I checked the doco - and couldn't find the answer to my question.
    Question:
    I've already seen it, but can't remember where it is, does anyone know the name of the BSP Sample/Example which comes with the WAS which has the EP6 look and feel ?
    I saw it a few weeks ago and I can't find it now and I want to study the code from it to make my app have a nicer look and feel.
    Note: I read Thomas's blog on - 'A developer's Journal Part VI
    and although that example discussed what I am interested in I couldn't see examples in the code of creating the header bar etc, maybe it's just me, but at the moment that's what I would like to achieve and to do it by example.
    So to conclude if anyone knows / can remember the name of the BSP example which has an EP6 look and feel please let me know so that I can study it for inspiration.
    Thanks very much,
    Milan.

    Hallo Milan,
    I think that you are doing good. It is always the best to follow a small mix of documentation reading and practical work. So let me tell you the minimum to get a first version working. Thereafter to can continue reading!
    Problem: we want to implement a simple link tag (in 15 minutes!) that works like this:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <%@extension name="bcm06" prefix="bcm06"%>
    <htmlb:content design="design2003">
      <htmlb:page>
          <b><bcm06:simpleLink href="http://www.sap.com">
              SAP Home Page!
          </bcm06:simpleLink></b>
      </htmlb:page>
    </htmlb:content>
    In SE80 we defined a new BSP library bcm06. We define a new element simpleLink. Typical handler class name will be CL_BCM06_SIMPLELINK (just the convention we use).  As body this tag can contain other HTML and also over BSP elements (we want to just render a link around all of body). We don't worry about the rest of the checkboxes. They will become interesting later on.
    We activate the library. The workbench will detect that no handler class exists, and will generate all of the stuff we need. Now already the tag is full functional, and can be used on any BSP page. It just will not do anything.
    What was generated? The class inheritance diagram is as follow: CL_BCM06_SIMPLELINK --> CL<b>G</b>_BCM06_SIMPLELINK --> CL_BSP_ELEMENT.
    The class CL_BSP_ELEMENT is the base class, and it contains a lot of interesting functionality. None of which we worry about now. Never try to change it!
    The class CL<b>G</b>_BCM06_SIMPLELINK (note that CLG<b></b>_!) is generated new each and everytime that you touch the definition of the tag. Effectively all the defined attributes are generated onto this class, so that they are already of the correct type, and that this information is always in sync. This means that all your tag defined attributes are directly attributes on your class. In our case, the defined "href" attribute (type string) is now an attribute on the CLG class.
    The last class CL_BCM06_SIMPLELINK will only be generated once if it does not exist. This is the class where you work. In this class there are two methods that are interesting to you at this moment. Later you will learn about the rest.
    DO_AT_BEGINNING: This method is called effectively in response to the <lib:tag> sequence. This is the code that executes before the body. This is the place where we would like to render out "<a href=...>" sequence.
    DO_AT_END: This method is called effectively at the end of the tag, when the </lib:tag> is seen. The body has now already been processed and sent onto the output stream. So we only need to render "</a>".
    Note that these methods are implemented empty. You <b><u>*MUST*</u></b> overwrite them, and implement them in your class. See instructions from Thomas. Source code:
    <b>METHOD if_bsp_element~do_at_beginning.</b>
      DATA: html TYPE string.
      CONCATENATE `<a href="` me->href `">` INTO html.
      me->print_string( html ).
      rc = co_element_continue.
    ENDMETHOD.
    <b>METHOD if_bsp_element~do_at_end.</b>
      me->print_string( `</a>` ).
      rc = co_page_continue.
    ENDMETHOD.
    Notice that you DO NOT need that super call. The base method will always be empty (from definition, will never change). You also have a direct PRINT_STRING method in newer SPs. The return code you must set. (To tell the truth, the constants for RC have been picked so perfectly that if you forget them, it should not hurt in 85% of the cases.)
    That is it. Test page. Mine worked!
    Of course, we can start looking at more exotic things, like empty tags, at tags that skip their bodies if not required, processing the body, validation, etc.
    But this overview was just to give you that first success feeling, and also to give you a better framework for understanding more of the documentation as you continue to read.
    Recommended: read <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">Getting Help</a> to see how you can quickly navigate between BSP page and a tag's definition, from where you also quickly get to the implementation class of the tag.
    bye, brian
    PS: Now if this is not already the first page of your weblog done

  • Can we change the look and feel of the screen layout

    Dear All,
    I am new to ABAP WebDynpro, and would like to know the following with respect to ABAP WebDynpro :
    1. To what extent can we change the look and feel of the screen layout ?
    2. Is it possible to change the background color of the layout?
    3. Is it possible to change the color of, Buttons etc ?
    Any information / document/ link to explain this would be very helpful ..
    Thanks in advance,
    Aditi

    Hi,
    Psl check out these links.
    check out these webdynpro standard components in SE80 tcode -
    WDR_TEST_UI_ELEMENTS
    check out this link on webdynpro for ABAP-
    http://help.sap.com/saphelp_nw70/helpdata/EN/03/0048413e466e24e10000000a155106/frameset.htm-WD for ABAP
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/9319f88f8115ebe10000000a114a6b/frameset.htm -UI elements
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/9319f88f8115ebe10000000a114a6b/frameset.htm-Button Properties
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/9319f88f8115ebe10000000a114a6b/frameset.htm- For different Layouts
    Regards
    Lekha

  • Look and Feel Resources

    Anyone know a good site that explains how to start writing you own Look and Feel? Been searching for a while and I can't seem to find one.

    I'm rather sure you will start a discussion about the pro's and con's here. My position is: It depends.
    A static initializer is called, when the class is loaded, and it is difficult to control, in what order classes are loaded. A static method is called when you do it explicitely. So the static method has the great advantage, that you can control the time and sequence.
    However, a programmer could forget to call a static method. The initializer however is guaranteed to be called. So from this point of view, it is an arguemt for the static initializer.
    Some of your examples are also candidates for lazy initialization: Do it automatically on first use, e.g.
    static Trace trace = null; // some trace object, initialized with null
    public static synchronized Trace getTrace() {
        if (trace == null)
            trace = new Trace();
        return trace;
    }

  • SSHR reskin AKA 'How to Use Adobe Flash to Transform the Look and Feel...

    There was a presentation at the OHUG 2011 Conference titled 'How to Use Adobe Flash to Transform the Look and Feel of Oracle HR Self Service'. It presented a method of 're-skinning' SSHR to present a different UI to the user.
    Looking for anyone out there that has attempted to apply this to their Oracle HRSS pages. I know this company has developed (is developing?) a product based on this approach. I want to see if anyone has done it on their own and would be willing to share some details.
    Follow-up question. Has anyone availed themselves of the bespoke UI Development based on this approach from Applaud Solutions (as mentioned on their website), and care to comment on your experience?

    Any update on this please? Even we are looking for some pointers in this area.

  • IC_BASE look and feel (Default theme)  very urgent !!!

    Hi Gurus,
    Somehow the theme of my BSP application ic_base has been changed, entire look and feel of the application has been changed. Is the link between ic_base.css file with the ic_base bsp application has been changed?
    How can I restore my look and feel of my application?
    Very urgent!!!!
    regards,
    Abhi...

    avoid duplicate threads. continue the discussion in your old thread at
    BSP portal display problem (Urgent!!!)

  • 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.

  • Is a JSP Tag Library providing Oracle Financial look and feel available

    We are going to use Oracle Financial as part of our future application.
    That is why other parts of it (which we plan to develop using JDeveloper)
    have to have the same Look and Feel.
    Is a JSP Tag Library that provides Oracle Financial Look and Feel available?

    Oracle Applications use BC4J, UIX, and JDeveloper.
    The UIX framework implements the Oracle "Browser Look And Feel" (BLAF) that our Oracle Applications self-service applications use.
    The UIX JSP tag library lets JSP developers do the same.

  • JComboBox Lost Listener on Look and Feel change

    When the user change the Look And Feel on the Fly , any Listener that is done using
    myComboBox.getEditor().getEditorComponent().addXXXListener
    is lost
    I'm using Windows XP Service Pack 2, java 6 build 105
    Does someone have any inputs why this happen or how this can be "fixed" or maybe prevent. Do I'm doing something wrong?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    /* ComboBoxDemo2.java requires no other files. */
    public class ComboBoxDemo2 extends JPanel
                               implements ActionListener {
        static JFrame frame;
        JLabel result;
        String currentPattern;
        public ComboBoxDemo2() {
            setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
            String[] patternExamples = {
                     "dd MMMMM yyyy",
                     "dd.MM.yy",
                     "MM/dd/yy",
                     "yyyy.MM.dd G 'at' hh:mm:ss z",
                     "EEE, MMM d, ''yy",
                     "h:mm a",
                     "H:mm:ss:SSS",
                     "K:mm a,z",
                     "yyyy.MMMMM.dd GGG hh:mm aaa"
            currentPattern = patternExamples[0];
            //Set up the UI for selecting a pattern.
            JLabel patternLabel1 = new JLabel("Enter the pattern string or");
            JLabel patternLabel2 = new JLabel("select one from the list:");
            JComboBox patternList = new JComboBox(patternExamples);
            patternList.setEditable(true);
            patternList.addActionListener(this);
    //-------------------------------- XXX------------------------------------------
    //      This KeyListener it is lost when the user change the theme on the fly       
            patternList.getEditor().getEditorComponent().addKeyListener(new KeyAdapter()
            public void keyPressed(KeyEvent e)
             System.out.println(" Key pressed is "+e.getKeyCode());     
            //Create the UI for displaying result.
            JLabel resultLabel = new JLabel("Current Date/Time",
                                            JLabel.LEADING); //== LEFT
            result = new JLabel(" ");
            result.setForeground(Color.black);
            result.setBorder(BorderFactory.createCompoundBorder(
                 BorderFactory.createLineBorder(Color.black),
                 BorderFactory.createEmptyBorder(5,5,5,5)
            //Lay out everything.
            JPanel patternPanel = new JPanel();
            patternPanel.setLayout(new BoxLayout(patternPanel,
                                   BoxLayout.PAGE_AXIS));
            patternPanel.add(patternLabel1);
            patternPanel.add(patternLabel2);
            patternList.setAlignmentX(Component.LEFT_ALIGNMENT);
            patternPanel.add(patternList);
            JPanel resultPanel = new JPanel(new GridLayout(0, 1));
            resultPanel.add(resultLabel);
            resultPanel.add(result);
            patternPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
            resultPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
            add(patternPanel);
            add(Box.createRigidArea(new Dimension(0, 10)));
            add(resultPanel);
            setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
            reformat();
        } //constructor
        public void actionPerformed(ActionEvent e) {
             System.out.println("Action Event");                
            JComboBox cb = (JComboBox)e.getSource();
            String newSelection = (String)cb.getSelectedItem();
            currentPattern = newSelection;
            reformat();
        /** Formats and displays today's date. */
        public void reformat() {
             try {
            Date today = new Date();
            SimpleDateFormat formatter =
               new SimpleDateFormat(currentPattern);
                String dateString = formatter.format(today);
                result.setForeground(Color.black);
                result.setText(dateString);
            }catch (IllegalArgumentException iae) {     
            System.out.println("Ilegal argument Exception");   
            catch (Exception e) {
            System.out.println("Argument Exception");                
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            final JFrame frame = new JFrame("ComboBoxDemo2");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new ComboBoxDemo2();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setLayout(new BorderLayout());      
            //frame.setContentPane(newContentPane,BorderLayout.CENTER);
            JMenuBar menuBar = new JMenuBar();
            JMenu theme = new JMenu("Theme");
            ButtonGroup bttnGroup = new ButtonGroup();
            JCheckBoxMenuItem metal = new JCheckBoxMenuItem("Metal");
            bttnGroup.add(metal);
            metal.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
              try{
              UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
              SwingUtilities.updateComponentTreeUI(frame);
              }catch(Exception a){a.printStackTrace();}
              theme.add(metal);
            JCheckBoxMenuItem system = new JCheckBoxMenuItem("System");
            bttnGroup.add(system);
            system.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
              try{
              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              SwingUtilities.updateComponentTreeUI(frame);
              }catch(Exception a){a.printStackTrace();}
            theme.add(system);
            menuBar.add(theme);     
            frame.setJMenuBar(menuBar);
            JToolBar jtb = new JToolBar();
            jtb.add(newContentPane);
            frame.add(jtb, BorderLayout.PAGE_START);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Thanks to both Rodney_McKay and jasper for their replys and ideas
    This code is working fine
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    /* ComboBoxDemo2.java requires no other files. */
    public class ComboBoxDemo2 extends JPanel
                               implements ActionListener {
        static JFrame frame;
        JLabel result;
        String currentPattern;
        private JComboBox patternList = new JComboBox();
        public ComboBoxDemo2() {
            setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
            String[] patternExamples = {
                     "dd MMMMM yyyy",
                     "dd.MM.yy",
                     "MM/dd/yy",
                     "yyyy.MM.dd G 'at' hh:mm:ss z",
                     "EEE, MMM d, ''yy",
                     "h:mm a",
                     "H:mm:ss:SSS",
                     "K:mm a,z",
                     "yyyy.MMMMM.dd GGG hh:mm aaa"
            currentPattern = patternExamples[0];
            //Set up the UI for selecting a pattern.
            JLabel patternLabel1 = new JLabel("Enter the pattern string or");
            JLabel patternLabel2 = new JLabel("select one from the list:");
            patternList = new JComboBox(patternExamples){
            public void updateUI(){
            System.out.println("UPDATE UI");
            super.updateUI();     
            changeUIAddEditorListener();
            changeUIAddEditorListener();
            patternList.setEditable(true);
            patternList.addActionListener(this);
            //Create the UI for displaying result.
            JLabel resultLabel = new JLabel("Current Date/Time",
                                            JLabel.LEADING); //== LEFT
            result = new JLabel(" ");
            result.setForeground(Color.black);
            result.setBorder(BorderFactory.createCompoundBorder(
                 BorderFactory.createLineBorder(Color.black),
                 BorderFactory.createEmptyBorder(5,5,5,5)
            //Lay out everything.
            JPanel patternPanel = new JPanel();
            patternPanel.setLayout(new BoxLayout(patternPanel,
                                   BoxLayout.PAGE_AXIS));
            patternPanel.add(patternLabel1);
            patternPanel.add(patternLabel2);
            patternList.setAlignmentX(Component.LEFT_ALIGNMENT);
            patternPanel.add(patternList);
            JPanel resultPanel = new JPanel(new GridLayout(0, 1));
            resultPanel.add(resultLabel);
            resultPanel.add(result);
            patternPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
            resultPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
            add(patternPanel);
            add(Box.createRigidArea(new Dimension(0, 10)));
            add(resultPanel);
            setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
            reformat();
        } //constructor
        public void actionPerformed(ActionEvent e) {
             System.out.println("Action Event");                
            JComboBox cb = (JComboBox)e.getSource();
            String newSelection = (String)cb.getSelectedItem();
            currentPattern = newSelection;
            reformat();
        /** Formats and displays today's date. */
        public void reformat() {
             try {
            Date today = new Date();
            SimpleDateFormat formatter =
               new SimpleDateFormat(currentPattern);
                String dateString = formatter.format(today);
                result.setForeground(Color.black);
                result.setText(dateString);
            }catch (IllegalArgumentException iae) {     
            System.out.println("Ilegal argument Exception");   
            catch (Exception e) {
            System.out.println("Argument Exception");                
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            final JFrame frame = new JFrame("ComboBoxDemo2");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new ComboBoxDemo2();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setLayout(new BorderLayout());      
            //frame.setContentPane(newContentPane,BorderLayout.CENTER);
            JMenuBar menuBar = new JMenuBar();
            JMenu theme = new JMenu("Theme");
            ButtonGroup bttnGroup = new ButtonGroup();
            JCheckBoxMenuItem metal = new JCheckBoxMenuItem("Metal");
            bttnGroup.add(metal);
            metal.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
              try{
              UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
              SwingUtilities.updateComponentTreeUI(frame);
              }catch(Exception a){a.printStackTrace();}
              theme.add(metal);
            JCheckBoxMenuItem system = new JCheckBoxMenuItem("System");
            bttnGroup.add(system);
            system.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e){
              try{
              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              SwingUtilities.updateComponentTreeUI(frame);
              }catch(Exception a){a.printStackTrace();}
            theme.add(system);
            menuBar.add(theme);     
            frame.setJMenuBar(menuBar);
            JToolBar jtb = new JToolBar();
            jtb.add(newContentPane);
            frame.add(jtb, BorderLayout.PAGE_START);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
       public void changeUIAddEditorListener() {
       patternList.getEditor().getEditorComponent().addKeyListener(new KeyAdapter()
       public void keyPressed(KeyEvent e)
       System.out.println(" Key pressed is "+e.getKeyCode());     
    }

  • Portlet look and feel

    Is it possible to modify the portleet look and feel with JSR-168 the same as we
    can do with page flow portlet. I don't want to display the Maximize/Minimize as
    well as the portlet title.
    Is it something that can be configured in the portlet.xml file ? otherwise can
    i modify the portal framework files ?
    Thanks

    I have a portlet developed using JSF in sun creator studio and imported to the Weblogic workshop after running the portlet preparer tool. However the Maximize/Minimize button shows up but does not work on this portal.
    Here is the portal.xml file
    <?xml version='1.0' encoding='UTF-8' ?>
    <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
    <portlet>
    <description>
    Created By Java Studio Creator
    </description>
    <portlet-name>
    components
    </portlet-name>
    <display-name>
    components Portlet
    </display-name>
    <portlet-class>
    com.sun.faces.portlet.FacesPortlet
    </portlet-class>
    <init-param>
    <name>com.sun.faces.portlet.INIT_VIEW</name>
    <value>/home.jsp</value>
    </init-param>
    <expiration-cache>0</expiration-cache>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>VIEW</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
         <title>components</title>
         <short-title>components</short-title>
         <keywords>Creator</keywords>
    </portlet-info>
    </portlet>
    </portlet-app>
    How do I get the Maximize/Minimize button behaviour?
    Also, how can I take out Maximize/Minimize buttons in JSR-168 portlets?.

Maybe you are looking for

  • Packaging output.-URGENT

    Hi Guru, When user creating delivery and changing PGI date e.g 27/09 to 26/09 he is unable to view the output of packaging material. When he is not changing PGI date it is coming. The same scenario I run it's working properly. I checked configuration

  • New Nano Owner Lost

    OK so my girlfriend bought me the new 2nd gen Nano for Christmas. Totally digging it until today! I was deleting music off of iTunes and after I finished I plugged the Nano in to update it. The only catch is My Computer and iTines do NOT recognize th

  • Context elements renaming

    I had created one Interactive Adobe form earlier. Now I am going to its interface and renaming some of the parameters. I want to know whether this parameters' new names would be automatically reflected in: a. context of the adobe form b. all the name

  • Internal Error Occurred With Adobe Reader 9.3 (Vista)

    I have Vista.  I had Adobe installed on the computer and it had been working fine for 6 mths.  Recently was prompted by the computer that Adobe needed an update.  I ran the install for 9.3 and it appeared to work, but when launching program get an er

  • Batch rename files that have non consecutive numbers?

    I have a folder with about 100 image files that have non consecutive numbers. Is there a way to rename them all to add something after the numbers (and before file type extension) without changing the numbers? Example: If I select 111019.003.dng and