Adding icon to start menu

hi frndz,
Just I want to know dat, if i need to add my program to installed program how to do? and want to add my program into start menu also.

This is Windows you're asking about, right? Typically you just configure your installer to do those things. If you're doing your own install, then you use whatever Windows APIs exist to do them. Although adding something to the start menu is just a matter of creating a shortcut file in a particular directory.
At any rate the question is nothing to do with Java. It's a question about Windows. So you should really look for a Windows forum or help site.

Similar Messages

  • Mail Icon from STart menu has wrong user info

    we set up the new 400 pavilion slimline pc, and see an incorrect user name in the start menu.  first question is how to change that.  next, when we click on the Mail icon, a different user name appears (what appears is username and password request info that was sent from my work pc to this home pc as a means of testing and practise for the homeowner to access mail)  it's like the home pc took over my work username info and installed it in the Mail icon set up!
    in sum, how can we change what first appears as an incorrect user name, and set up the correct user name on the Mail icon prompt.     the home owner can access and get mail, so that works fine but we added the comcast account link into 'favorites' folder as a means to connect into her mail.  we naturally want to make this easier by just selecting the Mail icon off the Start menu.  thanks! tc17

    Hello tc17,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand you are looking for chagne the profile username as well as the mail username on your HP 400 Pavilion Slimline computer. I would be happy to assist you, but first I would encourage you to post which operating system you are using. And whether your operating system is 32-bit or 64-bit as with this I can provide you with accurate information.
    Which Windows operating system am I running?
    Is the Windows Version on My Computer 32-bit or 64-bit?
    Please re-post with the requested information and I would be happy to provide you with assistance. Thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • Itunes will not open from desktop icon or start menu?

    itunes will not open from the desktop icon or from the start menu?

    Are you getting an error message when you try to launch iTunes, patrice? If so, what does it say? (Precise text, please.)

  • No Icons in Start menu after the Installation of 9i

    Hello,
    unfortunately the installation program of developer suite 9i did not create any icons in my start menu. is there any way of installing them manualy using the installer ? or can somebody just send me them (the complete icon set including discover, reports, forms and so on...) to this email: [email protected]
    Thanks in advance
    regards

    The icons are contained within the executales. To create an icon for Forms, just select to create a shortcut for the Forms ifbld90.exe file and this will have the Forms icon. There is a folder in the Explorer that contains all program icons that are accessible from the start menu. Just drag and drop your short cut into it.
    I would suggest to rerun the installer if not already done.
    Frank

  • How to SQL Server icons in start menu (Win Server 2012 R2)

    Hi Folk's,
    I have an installation of SQL Server 2012 Developer Edition on Windows Server 2012 R2.  The installation was successful with the exception I have no SQL icons in the start menu - so I can't run the SQL Server Management Studio without going and looking
    for the executable.
    Does anyone know how I can re-generate the icons. I have tried doing a repair but this did not work.
    Regards
    Andy

    I deleted the virtual machine and did a clean install and got the same issue.   SQL Server 2012 SP1 Developer Edition does not install the icons in the start menu on Windows 2012 R2  (it works fine on Windows Server 2012).
    In the Search menu if I type in SQL it just comes up with the SQL Server Installation center. 
    I have checked via the installer and via the discovery report mentioned above and all features are recorded as being installed.
    However, I note that the Management Studio executable is missing (and likely so are some of the others).
    Hi AndyW2007,
    According to your description, we need to verify if you have install SQL Server 2012 Developer Edition successfully, you can check the setup log in the following folder.
    -- C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\LOG\Summary.txt.
    --C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt
    If installing well, but the icons does not show in the start menu, I recommend you can create the lnk from the following installing location.
    C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe
    If you have any feedback on our support, please click here.
    Thanks,
    Sofiya Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • No FP icon on start menu

    Problem with Flash installation.  I’ve reinstalled several times.  Install successful.  It’s icon also shows up on control panel list.  But icon doesn’t show up on Start menu program list so program can’t be run.

    Flash Player is a plugin and doesn't show in the Start menu. Ir runs in your browser (Internet Explorer, Firefox, Chrome, Safari or Opera) The standalone Flash Player is only available as a component of Flash Professional.

  • System Update icon in Start menu deleted after upgrade to latest version

    I had a "System Update" icon in Start > Programs > Lenovo.
    After I installed the update through System Update the icon is not there anymore.
    Solved!
    Go to Solution.

    I uninstalled System Update and reinstalled it.
    This Start menu icon is now in the "Lenovo ThinkVantage" folder while all other ThinkVantage icons are in "ThinkVantage". This is a bug!

  • Skype for Business not updating icons on start menu - Using OCT for Lync 2013 deployment

    We're currently deploying Lync 2013 to out fleet using the OCT to customize where the shortcuts are created.
    What we are finding is that the Skype for Business Patch does not update these icons.  It only updates the icons if they are in the default location (no OCT).
    Is there a standalone Installer for Skype for Business we could apply a TRANSFORM to? Or some other method of updating all icons startmenu, taskbar etc.
    Thanks

    Hi Alan Dooley,
    Have you tried to create a new desktop shortcut ?
    In addition, you can try to follow the FAQ below to rebuild the icon cache.
    https://social.technet.microsoft.com/Forums/windows/en-US/bea47202-d869-4155-8c8f-2a5b8bd7be1d/forum-faqhow-to-rebuild-icon-cache
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to create an icon in start menu at bottom of iMac screen which links to address book in Mavericks OSX 10.9

    How do I do this?

    Choose Applications from the Finder's Go menu and drag the desired application there.
    (92952)

  • HT202731 my imac goes to homescreen but no icon or start menu

    my iMac boots to blank homescreen.could someone please help..running osx10.6 8

    Hello,
    At this point I think your best bet is to take it in for servicing at the local service center.
    As for your data, I think odds are that it is still in-tact. The type of failure you describe sounds more like a failed logic-board or possibly the power supply (improper voltage / low-voltage).
    Most likely it's a failed logic-board. But, the power supply can cause these symptoms as well.
    Neither would mean that your hard drive is bad. It's possible that it is, but it's not an automatic definite.
    If it were only the hard drive that failed, then you'd get the grey Apple screen with a flashing question-mark.
    So, what I would do, is request them to fix the computer. But, I would put a stipulation on it that requires them to call you if they are going to re-format or replace the hard drive.
    This way you'll know in advance if they are going to erase your data. You could then decide whether to pay them to archive it onto another media or back it up for you, or just let it go.
    Explain to them that you have information you are concerned about saving. And, request them to at least let you know if their repair process is going to require them to do anything that might erase the hard drive.
    I think that's about the best you can do at this point.
    I hope this helps.

  • Start Menu Folder Redirection In Windows Server 2008 R2 (Via GPO) For Windows 7 Professional

    Hi,
    I'm having the problem where a redirected start menu appears empty. Using
    server 2008 R2 and the clients are Windows 7 Professional; i am getting empty start menu.
    Note:- Same is working perfectly fine with Windows
    XP machines.
    I believe the policy is set up correctly.
    Setting: Basic (Redirect everyone's
    folder to the same location)
    Path: \\10.x.x.x\redirection\StartMenu
    Options:
    Grant user exclusive rights to Start Menu - Disabled 
    Move the contents of Start Menu to the new location - Disabled 
    Also apply redirection policy to Windows 2000, Windows 2000 server, Windows XP, and Windows Server 2003 operating systems  - Enabled 
    Policy Removal Behavior - Leave contents
    Start Menu and Taskbar
    Policy
    Setting
    Comment
    Clear history   of recently opened documents on exit
    Enabled
    Clear the   recent programs list for new users
    Enabled
    Do not keep   history of recently opened documents
    Enabled
    Do not search   for files
    Enabled
    Lock all   taskbar settings
    Enabled
    Lock the   Taskbar
    Enabled
    Prevent   changes to Taskbar and Start Menu Settings
    Enabled
    Remove access   to the context menus for the taskbar
    Enabled
    Remove All   Programs list from the Start menu
    Enabled
    Remove common   program groups from Start Menu
    Enabled
    Remove Default   Programs link from the Start menu.
    Enabled
    Remove   Documents icon from Start Menu
    Enabled
    Remove   Downloads link from Start Menu
    Enabled
    Remove   Favorites menu from Start Menu
    Enabled
    Remove   frequent programs list from the Start Menu
    Enabled
    Remove Games   link from Start Menu
    Enabled
    Remove Help   menu from Start Menu
    Enabled
    Remove   Homegroup link from Start Menu
    Enabled
    Remove links   and access to Windows Update
    Enabled
    Remove Music   icon from Start Menu
    Enabled
    Remove Network   Connections from Start Menu
    Enabled
    Remove Network   icon from Start Menu
    Enabled
    Remove   Pictures icon from Start Menu
    Enabled
    Remove   programs on Settings menu
    Enabled
    Remove Recent   Items menu from Start Menu
    Enabled
    Remove Run   menu from Start Menu
    Enabled
    Remove Search   Computer link
    Enabled
    Remove Search   link from Start Menu
    Enabled
    Remove See   More Results / Search Everywhere link
    Enabled
    Remove the   Action Center icon
    Enabled
    Remove user   folder link from Start Menu
    Enabled
    Remove user's   folders from the Start Menu
    Enabled
    Remove Videos   link from Start Menu
    Enabled
    Please help !
    Regards Zargar Muneer

    Hi Zargar,
    >>Using server 2008 R2 and the clients are Windows 7 Professional; i am getting empty start menu.
    This is normal, for we disabled the option
    Move the contents of Start Menu to the new location. This option is enabled by default and it will automatically move the existing content to the new location.
    At this moment, we can manually copy the files we want from the local locations.
    Best regards,
    Frank Shen

  • Desktop and start menu vanished

    hp mini 1000/ mdl 1151nr windows loads but i do not have desktop or icons. no start menu. how can i get my desktop back?

    Hi,
    Tap away at f8 as you start the PC to enter Windows Recovery Console.  Use the arrows to select 'Start using last known Good Configuration' and hit enter.  See if this helps.  If it does, I would recommend running a full scan with your security software.
    Let me know how you get on.
    Best wishes,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Creating desktop shorcut and start menu entry using java

    Hey Guys
    I have a requirement in which i will need to install a desktop application .After installing i will need to created desktop shortcut icon and start menu entries.
    I have worked very less with desktop application and hence i need some help in figuring out how to achieve this.
    Any help would be greatly appreciated.
    Thanks
    Chetan

    George ,
    Thanks for ur reply .Just to give you some background on this one.
    We were using Java web start to do the installation and it used to take care of creating the shortcut icon and start menu entries.
    The problem is that we have decided to move away from java web start and use the exe approach of installing .We wrap our JAR files in an exe and make use of Launch4j. See - launch4j.sourceforge.net/ .
    The launch4j software helps in bundling all our JARs into an exe and when the exe is clicked it invokes a class present in our JAR file .However it does not create any icons because of which we will need to do that manually.
    Any ideas on this?
    Thanks
    Chetan

  • Lost start menu icons and not listed in right click open with option +more.

    Weird. I need help. Quicktime 7.3.0.70 only--Start menu lost it's icons in the quicktime folder. When right clicking video files, the "open with" option no longer displays quicktime as a program. And lastly, open an avi file or even mpg and the program stops responding without even getting to play the file. I've uninstalled and reinstalled multiple times but can't seem to fix these issues. Can anyone help? Thanks. This just seemed to happen out of the blue.
    Message was edited by: sallem

    I also have lost the icons for Quicktime in my start menu under Windows XP. The icons actually work when you do click them but the icons are not loaded. Everything functions fine and it's the newest version of Quicktime installed. I also have the newest version of iTunes installed. I ended up manually adding my own icons on the start menu as I've uninstalled and reinstalled Quicktime several times to no avail and even attempted to flush the windows icon cache. No go. This just started happening recently.
    It's not happening on my WinXP Pro laptop however, although I've yet to upgrade to the latest version of iTunes+Quicktime.
    *Right-Click Open With Menu still functions properly and the icon image is appearing correctly in that menu.
    Message was edited by: ZenFool

  • Adding icons to menu items

    Okay, I'm a newbie at Java. I have a problem that I'm trying to solve. I added icons to the File menu item, that was easy, but how do I add icons to the other menu items? They are DefaultEditorKit. actions (cut copy paste undo redo) I can't seem to change their names either.
    I'm also having problems with saving the changes I make in the text area.
    Here's the whole code.
    package components;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.HashMap;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.AbstractButton;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.undo.*;
    public class TextComponentDemo extends JFrame implements ActionListener {
        JTextPane textPane;
        AbstractDocument doc;
        JTextArea changeLog;
        JButton newButton, openButton, saveButton, undoButton, redoButton, /*cutButton, copyButton, pasteButton,*/ boldButton, italicButton, underlineButton;
        protected String newline = "\n";
        HashMap<Object, Action> actions;
         File fFile = new File("default.txt");
         JavaFilter fJavaFilter = new JavaFilter();
        protected UndoAction undoAction;
        protected RedoAction redoAction;
        protected UndoManager undo = new UndoManager();
        public TextComponentDemo() {
            super("Notepad v1.0");
            //Create the text pane and configure it.
            textPane = new JTextPane();
            textPane.setCaretPosition(0);
            textPane.setMargin(new Insets(5,5,5,5));
            StyledDocument styledDoc = textPane.getStyledDocument();
            if (styledDoc instanceof AbstractDocument) {
                doc = (AbstractDocument)styledDoc;
            } else {
                System.err.println("Text pane's document isn't an AbstractDocument!");
                System.exit(-1);
            JScrollPane scrollPane = new JScrollPane(textPane);
            scrollPane.setPreferredSize(new Dimension(600, 350));
            newButton = new JButton ("", createImageIcon("images/new.png"));
            newButton.setBackground(Color.white);
       //     newButton.setActionCommand("nou");       
       //     newButton.addActionListener(this);        
            openButton = new JButton("", createImageIcon("images/open.png"));
            openButton.setBackground(Color.white);
            openButton.setActionCommand("deschide");       
            openButton.addActionListener(this);
            saveButton = new JButton("", createImageIcon("images/save.png"));
            saveButton.setBackground(Color.white);
            saveButton.setActionCommand("salveaza");       
            saveButton.addActionListener(this);
            Action actionBold = new StyledEditorKit.BoldAction();
            actionBold.putValue(Action.NAME, "Bold");
            boldButton = new JButton(actionBold);
            boldButton.setBackground(Color.white);
            Action actionItalic = new StyledEditorKit.ItalicAction();
            actionItalic.putValue(Action.NAME, "Italic");
            italicButton = new JButton(actionItalic);
            italicButton.setBackground(Color.white);
            Action actionUnderline = new StyledEditorKit.UnderlineAction();
            actionUnderline.putValue(Action.NAME, "Underline");
            underlineButton = new JButton(actionUnderline);
            underlineButton.setBackground(Color.white);
              String[] fontStrings = { "Arial", "Arial Black", "Comic Sans MS", "Georgia", "Serif", "SansSerif", "Times New Roman", "Trebuchet MS", "Verdana" };
              JComboBox fontList = new JComboBox(fontStrings);
            fontList.setSelectedIndex(0);
            fontList.setBackground(Color.white);
            fontList.setActionCommand("font");
            fontList.addActionListener(this);
               String[] sizeStrings = { "12", "14", "16", "18", "20", "22", "24", "36", "48" };
              JComboBox sizeList = new JComboBox(sizeStrings);
            sizeList.setSelectedIndex(0);
            sizeList.setBackground(Color.white);
            sizeList.setActionCommand("size");
            sizeList.addActionListener(this);
            JPanel buttonPanel = new JPanel(); //use FlowLayout
              buttonPanel.add(newButton);
            buttonPanel.add(openButton);
            buttonPanel.add(saveButton);
         //   buttonPanel.add(cutButton);
         //   buttonPanel.add(copyButton);
         //   buttonPanel.add(pasteButton);
            buttonPanel.add(boldButton);
            buttonPanel.add(italicButton);
            buttonPanel.add(underlineButton);
            buttonPanel.add(fontList);
            buttonPanel.add(sizeList);
            getContentPane().add(buttonPanel, BorderLayout.PAGE_START);
             getContentPane().add(scrollPane, BorderLayout.CENTER);
            //Set up the menu bar.
            createActionTable(textPane);
            JMenu fileMenu = createFileMenu();
            JMenu editMenu = createEditMenu();
            JMenu fontMenu = createFontMenu();
            JMenu ajutorMenu = createAjutorMenu();
            JMenuBar mb = new JMenuBar();
            mb.add(fileMenu);
            mb.add(editMenu);
            mb.add(fontMenu);
            mb.add(ajutorMenu);
            setJMenuBar(mb);
            //Start watching for undoable edits and caret changes.
            doc.addUndoableEditListener(new MyUndoableEditListener());
           //This one listens for edits that can be undone.
        protected class MyUndoableEditListener
                        implements UndoableEditListener {
            public void undoableEditHappened(UndoableEditEvent e) {
                //Remember the edit and update the menus.
                undo.addEdit(e.getEdit());
                undoAction.updateUndoState();
                redoAction.updateRedoState();
    private ImageIcon createImageIcon (String fileName) {
          return new ImageIcon(fileName);
    protected JMenu createFileMenu() {
              JMenu menu = new JMenu("Fisier");
              menu.setMnemonic(KeyEvent.VK_F);
            JMenuItem menuItem;
            ImageIcon iconNou = new ImageIcon("images/new.png");
            menuItem = new JMenuItem("Nou", iconNou);
            menuItem.setMnemonic(KeyEvent.VK_N);
            menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
       //   menuItem.setActionCommand("nou");       
       //   menuItem.addActionListener(this);         
            menu.add(menuItem);
         menu.addSeparator();
              ImageIcon iconOpen = new ImageIcon("images/open.png");
              menuItem = new JMenuItem("Deschide", iconOpen);
            menuItem.setMnemonic(KeyEvent.VK_O);
            menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
              menuItem.setActionCommand("deschide");       
            menuItem.addActionListener(this);
              menu.add(menuItem);
              ImageIcon iconSave = new ImageIcon("images/save.png");
              menuItem = new JMenuItem("Salveaza", iconSave);
            menuItem.setMnemonic(KeyEvent.VK_S);
            menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
              menuItem.setActionCommand("deschide");       
            menuItem.addActionListener(this);
              menu.add(menuItem);          
         menu.addSeparator();     
              ImageIcon iconQuit = new ImageIcon("images/quit.png");
              menuItem = new JMenuItem("Iesire", iconQuit);
            menuItem.setMnemonic(KeyEvent.VK_Q);
            menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
              menuItem.setActionCommand("iesire");       
            menuItem.addActionListener(this);
              menu.add(menuItem);                    
              return menu;
         public void actionPerformed(ActionEvent e) {
             boolean status = false;
           /* if ("nou".equals(e.getActionCommand())) {
                 nou();
            if ("deschide".equals(e.getActionCommand())) {
                 status = openFile();
                   if(!status)
                        JOptionPane.showMessageDialog(
                             null,
                             "Eroare la deschiderea fisierului!", "Fisierul nu a putut fi deschis.",
                             JOptionPane.ERROR_MESSAGE
          /* if ("salveaza".equals(e.getActionCommand())) {
                 status = saveFile();
                   if(!status)
                        JOptionPane.showMessageDialog(
                             null,
                             "Eroare IO in salvarea fisierului!", "Fisierul nu a putut fi salvat.",
                             JOptionPane.ERROR_MESSAGE
            if ("iesire".equals(e.getActionCommand())) {
                 System.exit(-1);
            if ("font".equals(e.getActionCommand())) {
                 JComboBox cb = (JComboBox)e.getSource();
                 String fontName = (String)cb.getSelectedItem();
                 String t = new String(textPane.getSelectedText());
    //               t.setText("fontName");
    //             t.setFont(new java.awt.Font(fontName, 0, 12));
    //               StyledEditorKit.FontFamilyAction font = new StyledEditorKit.FontFamilyAction(fontName, fontName);
         boolean openFile() {
                JFileChooser fc = new JFileChooser();
                fc.setDialogTitle("Deschide Fisier");
                fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
                fc.setCurrentDirectory(new File ("."));
                fc.setFileFilter(fJavaFilter);
                int result = fc.showOpenDialog(this);
                if(result == JFileChooser.CANCEL_OPTION) {
                     return true;
                else if(result == JFileChooser.APPROVE_OPTION) {
                     fFile = fc.getSelectedFile();
                     String file_string = readFile(fFile);
                     if(file_string != null) {
                          textPane.setText(file_string);
                     else
                          return false;
                else {
                     return false;
                return true;                                         
            public String readFile (File file) {
              StringBuffer fileBuffer;
             String fileString=null;
             String line;   
             try {
                   FileReader in = new FileReader (file);
                    BufferedReader dis = new BufferedReader (in);
                    fileBuffer = new StringBuffer () ;
                   while ((line = dis.readLine ()) != null) {
                     fileBuffer.append (line + "\n");
                    in.close ();
                    fileString = fileBuffer.toString ();
                  catch  (IOException e ) {
                    return null;
             return fileString;
    /* boolean saveFile () {
         File file = null;
         JFileChooser fc = new JFileChooser ();
         fc.setCurrentDirectory (new File ("."));
         fc.setFileFilter (fJavaFilter);
         fc.setSelectedFile (fFile);
         int result = fc.showSaveDialog (this);
         if (result == JFileChooser.CANCEL_OPTION) {
             return true;
         } else if (result == JFileChooser.APPROVE_OPTION) {
             fFile = fc.getSelectedFile ();
             if (fFile.exists ()) {
                 int response = JOptionPane.showConfirmDialog (null,
                   "Overwrite existing file?","Confirm Overwrite",
                    JOptionPane.OK_CANCEL_OPTION,
                    JOptionPane.QUESTION_MESSAGE);
                 if (response == JOptionPane.CANCEL_OPTION) return false;
             return writeFile (fFile, textPane.getText ());
         } else {
           return false;
      protected JMenu createEditMenu() {
            JMenu menu = new JMenu("Editare");
            menu.setMnemonic(KeyEvent.VK_E);
            JMenuItem menuItem;
            undoAction=new UndoAction();
            menu.add(undoAction);   
            redoAction = new RedoAction();
            menu.add(redoAction);
            menu.addSeparator();
              menu.add(getActionByName(DefaultEditorKit.cutAction));       
            menu.add(getActionByName(DefaultEditorKit.copyAction));
            menu.add(getActionByName(DefaultEditorKit.pasteAction));
            menu.addSeparator();
            menu.add(getActionByName(DefaultEditorKit.selectAllAction));
            return menu;
        //Create the style menu.
        protected JMenu createFontMenu() {
            JMenu menu = new JMenu("Font");
            menu.setMnemonic(KeyEvent.VK_F);
            JMenu subMenu = new JMenu ("Stil ");
            Action action = new StyledEditorKit.BoldAction();
            action.putValue(Action.NAME, "Bold");
            subMenu.add(action);
            action = new StyledEditorKit.ItalicAction();
            action.putValue(Action.NAME, "Italic");
            subMenu.add(action);
            action = new StyledEditorKit.UnderlineAction();
            action.putValue(Action.NAME, "Underline");
            subMenu.add(action);
              menu.add(subMenu);
            menu.addSeparator();
            JMenu subMenu2 = new JMenu ("Marime ");
            subMenu2.add(new StyledEditorKit.FontSizeAction("12", 12));
            subMenu2.add(new StyledEditorKit.FontSizeAction("14", 14));
            subMenu2.add(new StyledEditorKit.FontSizeAction("16", 16));
            subMenu2.add(new StyledEditorKit.FontSizeAction("18", 18));
            subMenu2.add(new StyledEditorKit.FontSizeAction("20", 20));
            subMenu2.add(new StyledEditorKit.FontSizeAction("22", 22));
            subMenu2.add(new StyledEditorKit.FontSizeAction("24", 24));
            subMenu2.add(new StyledEditorKit.FontSizeAction("36", 36));
            subMenu2.add(new StyledEditorKit.FontSizeAction("48", 48));
            menu.add(subMenu2);
            menu.addSeparator();
            JMenu subMenu3 = new JMenu ("Familie ");
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Arial", "Arial"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Arial Black", "Arial Black"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Comic Sans MS", "Comic Sans MS"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Georgia", "Georgia"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Serif", "Serif"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("SansSerif", "SansSerif"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Times New Roman", "Times New Roman"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Trebuchet MS", "Trebuchet MS"));
            subMenu3.add(new StyledEditorKit.FontFamilyAction("Verdana", "Verdana"));
            menu.add(subMenu3);
            menu.addSeparator();
            JMenu subMenu4 = new JMenu ("Culoare ");
            subMenu4.add(new StyledEditorKit.ForegroundAction("Rosu", Color.red));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Verde", Color.green));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Albastru", Color.blue));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Galben", Color.yellow));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Gri", Color.gray));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Gri inchis", Color.darkGray));
            subMenu4.add(new StyledEditorKit.ForegroundAction("Negru", Color.black));
            menu.add(subMenu4);
            return menu;
        protected JMenu createAjutorMenu() {
             JMenu menu = new JMenu("Ajutor");
            menu.setMnemonic(KeyEvent.VK_J);
            return menu;
        private void createActionTable(JTextComponent textComponent) {
            actions = new HashMap<Object, Action>();
            Action[] actionsArray = textComponent.getActions();
            for (int i = 0; i < actionsArray.length; i++) {
                Action a = actionsArray;
    actions.put(a.getValue(Action.NAME), a);
    private Action getActionByName(String name) {
    return actions.get(name);
    class UndoAction extends AbstractAction {
    public UndoAction() {
    super("Undo");
    setEnabled(false);
    public void actionPerformed(ActionEvent e) {
    try {
    undo.undo();
    } catch (CannotUndoException ex) {
    System.out.println("Unable to undo: " + ex);
    ex.printStackTrace();
    updateUndoState();
    redoAction.updateRedoState();
    protected void updateUndoState() {
    if (undo.canUndo()) {
    setEnabled(true);
    putValue(Action.NAME, undo.getUndoPresentationName());
    } else {
    setEnabled(false);
    putValue(Action.NAME, "Undo");
    class RedoAction extends AbstractAction {
    public RedoAction() {
    super("Redo");
    setEnabled(false);
    public void actionPerformed(ActionEvent e) {
    try {
    undo.redo();
    } catch (CannotRedoException ex) {
    System.out.println("Unable to redo: " + ex);
    ex.printStackTrace();
    updateRedoState();
    undoAction.updateUndoState();
    protected void updateRedoState() {
    if (undo.canRedo()) {
    setEnabled(true);
    putValue(Action.NAME, undo.getRedoPresentationName());
    } else {
    setEnabled(false);
    putValue(Action.NAME, "Redo");
    private static void createAndShowGUI() {
    final TextComponentDemo frame = new TextComponentDemo();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    UIManager.put("swing.boldMetal", Boolean.FALSE);
         createAndShowGUI();
    class JavaFilter extends javax.swing.filechooser.FileFilter
    public boolean accept (File f) {
    return f.getName ().toLowerCase ().endsWith (".txt")
    || f.isDirectory ();
    public String getDescription () {
    return "Fisiere text (*.txt)";

    Hi,
    unfortunatly you cannot change the properties of Action object as you would do with JavaBeans. Instead you have to use the 'put' method.
    eg.:
    myAction.put(Action.SMALL_ICON, new ImageIcon(...));IMHO this was a bad decision, because it's not like the JavaBeans standard and you loose static type information. :-/
    -Puce
    Message was edited by:
    Puce

Maybe you are looking for

  • Connecting 2nd nano to one pc (2 user accounts)

    My girfriends nano was set up (and works) several months ago. I have set up a new user account on the PC for me for my nano. Have tried to run the set up cd (under my account), but was asked if I wanted ro delete the exisitng I-tunes? Didn't want to

  • Ubuntu 10.04 (build 16.3-b01, mixed mode) - Applet Fails (log inside)

    I am looking for some advice on what to try next. ---- java console ---- Java Plug-in 1.6.0_20 Using JRE version 1.6.0_20-b02 Java HotSpot(TM) 64-Bit Server VM User home directory = /home/cprofitt c: clear console window f: finalize objects on finali

  • Pricat02 Idoc

    Hi All, what is Pricat02 Idoc? What are the fields and tables related to the Pricat02 Idoc?

  • Does APSB08-19 apply to Acrobat 7.1.0 Pro?

    The bulletin says the vulnerability applies to: Adobe Reader 8.1.2 and earlier versions Adobe Acrobat Professional, 3D and Standard 8.1.2 and earlier versions It does not specifically say Adobe Acrobat 7.x is not vulnerable. Support can't answer the

  • SNP releases pur req for 18 months,can I convert pur req to pur ord for 2 m

    Hello expert, please suggest me how could i solve below issue. Scenario: SNP releases purchase requisition for 18 months. I need to convert purchase requisition into purchase order only for two months. u2013 how could I do this? How can I do this con