harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linbin Yu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4722) [classlib][swing] Highlighting on menu has problem.
Date Mon, 03 Sep 2007 09:05:19 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Linbin Yu updated HARMONY-4722:
-------------------------------

    Attachment: RI.PNG

> [classlib][swing] Highlighting on menu has problem. 
> ----------------------------------------------------
>
>                 Key: HARMONY-4722
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4722
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Win32
>            Reporter: Linbin Yu
>         Attachments: harmony.PNG, RI.PNG
>
>
> import javax.swing.JFrame;
> import javax.swing.JMenu;
> import javax.swing.JMenuBar;
> import javax.swing.JMenuItem;
> import javax.swing.JScrollPane;
> import javax.swing.JTextArea;
> public class MenuDemo {
>     JTextArea output;
>     JScrollPane scrollPane;
>     public JMenuBar createMenuBar() {
>         JMenuBar menuBar;
>         JMenu menu, menu2,menu3,submenu,submenu2;
>         menuBar = new JMenuBar();
>         menu = new JMenu("Menu"); 
>         menu2 = new JMenu("Menu2");    
>         menu3 = new JMenu("Menu3");    
>         menu.add(new JMenuItem("item1"));
>         menu.add(new JMenuItem("item2"));
>         
>         submenu = new JMenu("submenu");
>         submenu.add(new JMenuItem("item1"));
>         submenu.add(new JMenuItem("item2"));
>         
>         submenu2 = new JMenu("submenu2");
>         submenu2.add(new JMenuItem("item1"));
>         submenu2.add(new JMenuItem("item2"));
>         submenu2.add(new JMenuItem("item3"));        
>         submenu.add(submenu2);
>         
>         menu.add(submenu);
>         menuBar.add(menu);
>         menuBar.add(menu2);
>         menuBar.add(menu3);
>         return menuBar;
>     }
>     public static void main(String[] args) {
>         javax.swing.SwingUtilities.invokeLater(new Runnable() {
>             public void run() {
>                 JFrame frame = new JFrame("MenuDemo");
>                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>                 MenuDemo demo = new MenuDemo();
>                 frame.setJMenuBar(demo.createMenuBar());
>                 frame.setSize(450, 250);
>                 frame.setVisible(true);
>             }
>         });
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message