Results 1 to 3 of 3
  1. #1
    fabr_00 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default FrameView iconified at startup

    Hi

    i'm writing a very easy desktop application with netbeans. I need that when the application starts, the FrameView will be iconified, than only the taskbar icon must be visible.
    Could you help me please?

    Java Code:
    /**
     * The main class of the application.
     */
    public class ProvaApp extends SingleFrameApplication {
        /**
         * At startup create and show the main frame of the application.
         */
        @Override protected void startup() {
            show(new ProvaView(this));
        }
    
        /**
         * This method is to initialize the specified window by injecting resources.
         * Windows shown in our application come fully initialized from the GUI
         * builder, so this additional configuration is not needed.
         */
        @Override protected void configureWindow(java.awt.Window root) {
        }
    
        /**
         * A convenient static getter for the application instance.
         * @return the instance of ProvaApp
         */
        public static ProvaApp getApplication() {
            return Application.getInstance(ProvaApp.class);
        }
    
        /**
         * Main method launching the application.
         */
        public static void main(String[] args) {
            launch(ProvaApp.class, args);
        }
    }
    Java Code:
    public class ProvaView extends FrameView {
    
        public ProvaView(SingleFrameApplication app) {
            super(app);
    
            initComponents();
    
            PopupMenu popup = new PopupMenu();
            MenuItem item = new MenuItem("Show interface");
            MenuItem item2 = new MenuItem("Options");
            popup.add(item);
            popup.add(item2);
    
            if (SystemTray.isSupported()) {
                sys = SystemTray.getSystemTray();
                icon = new TrayIcon(createImage("tryIcon.gif", "tray icon"),"MyDictionary",popup);
                try {
                    sys.add(icon);
                } catch (AWTException ex) {
                    Logger.getLogger(MyDictionaryView.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
    }
    Thanx

  2. #2
    fabr_00 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default

    No one can help me??

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default

    FrameView and SingleFrameApplication aren't part of the standard JDK. Ask the question wherever you got those classes from.

    db

Similar Threads

  1. Listing Startup programs
    By priya_java in forum New To Java
    Replies: 2
    Last Post: 09-24-2010, 06:27 PM
  2. Cast own class to FrameView
    By Luxpsycho in forum AWT / Swing
    Replies: 0
    Last Post: 07-16-2010, 11:13 AM
  3. NetBeans hangs on startup
    By peterme in forum NetBeans
    Replies: 1
    Last Post: 01-25-2010, 11:22 PM
  4. Open a shell minimized (iconified)
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-25-2008, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •