Canvas on the Internal Frame overlap the Menus.!!!

hi friends
i have added canvas on the internal frame(contentpane).
when internal frame appears on the screen menus are being overlapped.
it means if i open the menu they will be hide behind canvas and can not be seen.
plzz guide me what to do?

This is a typical problem when mixing Swing (JFrame) components with AWT components (Canvas). Make sure you stick to only one of these GUI packages when implementing your own gui.
Have a look at the java tutorial.
http://java.sun.com/docs/books/tutorial/uiswing/painting/overview.html
Manuel Amago.

Similar Messages

  • Where do I find the Application Frame ON/OFF in the menus?

    Where do I find the Application Frame to turn ON/OFF in the menus in Adobe Photoshop CC?

    Here's a screenshot from Photoshop CC, same for CC 2014 and other versions of Photoshop
    I did not see whether you are using Windows OS or Mac OS, but this is exclusively a Mac feature. You will not find it any Windows version of PS.
    You should see this:

  • Plz help me with the internal frames

    hi,.
    i have design mainframe of my application contain some jinternalframes
    .but these internal frames are not properly working since my mainframe contain borderlayout , mainframe also contain some menubar ,toolbar,jtable .so whenever i call my internalframes these frames just get behind my jtable . whenever i shift the border layout to
    east or west or north the internalframes just get shift inthe given space .actually by default i have border layout as center.when shift my layout to flow layout menubar,toolbar, every thing get shifted , so another problems occur. if iam using flow layout the size of the internalframes remain the same as setted in the code. else in the borderlayout it acqurie the whole of the desktopPane.and no resize code works on it. setsize,setbound,sestpreffredsize,dimension non of these method work.
    thanx for now hope u will slove my problems .

    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html]How to Use Internal Frames. You add a JDesktopPane to the contentPane and then add the JInternalFrames to the desktop pane.
    If you want to add other components to the GUI then you add them to some other part of the content pane. You don't mix other Swing components and internal frame on the desktop pane.

  • Getting the size of an internal frame?

    Hi allm
    I want to be able to get the size of an internal frame. I have set the size of the main JFrame to that of Windows by calling Toolkit.getScreenSize(); But i can't seem to find an equivalent for internal frames.
    Basically I have two components in the internal frame that I want to have equal width. I was going to find out the size of the internal frame and then half it and applay a horizontal strut to each component.
    If there is a better way of doing it i'm open to suggestions but any help at all is much appreciated
    Thanks
    Dylan
    BorderLayout border = new BorderLayout();       
             content.setLayout(border);
             Box left = Box.createVerticalBox();
             left.add(Box.createHorizontalStrut(400));
             JPanel Create = new JPanel();
                 Create.setBorder(new TitledBorder (new EtchedBorder(), "Create Database"));
                 left.add(Create);
                 Box right = Box.createVerticalBox();
                 right.add(Box.createHorizontalStrut(400));
                 JPanel Help = new JPanel();
                 Help.setBorder(new TitledBorder (new EtchedBorder(), "Help"));
                 right.add(Help);
                 content.add(left, BorderLayout.CENTER);
                 content.add(right, BorderLayout.CENTER);

    The situation is that I have a class that has about 80
    instance fields of basic data types. But it was
    getting overly complicated. As a number of these
    fields related to year and day data I tried to
    re-write with GregorianCalendar instead.
    There are in the region of 45,000 instance of my clas
    being held in an array, however when I tried to use my
    modified class (with the Calendar fields replacing the
    basic data types) I kept running into OutOfMemoryError
    after about 25,000 instances were created. So I
    figured that the GregorianCalendar class must be
    eating up my memory. Was intrigued, but couldn't find
    out how to calculate the size of my new class.
    Hmmm, serialize it you say? Ok, I'll try that.ok don't do that ;)
    ummm i was giving advice assuming (incorrectly i turns out) that you were trying to see how much space the serialized object would take up when written to disk or over a network etc.
    this does not appear to be your problem.
    so here are my new more informed suggestions.
    1) if you were going to write out the "data" parts of your object so
    it could be re-created what would they be. i'm thinking you could
    just boil it all down maybe to a long as in Date.getTime(); then
    you could have a long[] array with 45,000 slots. this should take up far less memory than having myObject[] with 45,000 slots. then you
    could have one actual object that you insert the data into to play
    around with. this may not be the idealists solution but if you have a
    lot of objects you may not want to carry around all the excess
    stuff.
    2) as an aside you say you tried to re-write the GregorianCalendar...
    have your tried extending it or extending Calendar. the idea of
    extending other non-final classes is you can provide your own
    implementation of some things or add totally new methods without having
    to re-write an existing class.
    just some ideas...

  • How to realize the internal frame as in Swing?

    How to realize the internal frame as in Swing? JavaFX has the similar function?

    For system tray in JavaFX 2.2, you need to use AWT, see =>
    Re: How to call Stage’s show/hide methods from AWT-thread
    http://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html
    awt - JavaFX app in System Tray - Stack Overflow

  • Problem in Disabled the Menus

    hi everyone,
    Hello am developing a application in java. I used InternalFrame and JDesktop.. My problem is after the login i want to disabled the menu in the Menubar when the user login sucessfully it will be enabled and ready to click. But am having a problem because my code in login is separated into the MainFrame.. i got to java file 1. MainFrame_PCM.java and MyLoginInternalFrame.java. So when the MainFrame_PCM was run it will call MyLoginInternalFrame as my login in window what i want is by default the MenuBar in MainFrame_PCM was set disabled and after login successfully i will set them enabled .Hope you understand my problem .Any help will do ..
    Thank you very much in advance
    Armando Dizon

    Hi Pravinth,
    Thank you very very much in reply in my email.Below is my code of the MainFrame and the LoginFrame as i mention in my previous post. The scencario in the thread that similar in my problem is you have to go to Main menu and click login and login form or frame will pop up in my case automatic popup and what i want sir is when the popup frame will appear and successfully login the Menu will be setEnabled. Thank you i really apprecaite your help
    /*File name : MainFrame_PCM.java*/
    import javax.swing.JInternalFrame;
    import javax.swing.JDesktopPane;
    import javax.swing.JMenu;
    import javax.swing.JMenuItem;
    import javax.swing.JMenuBar;
    import javax.swing.JFrame;
    import javax.swing.KeyStroke;
    import java.awt.event.*;
    import java.awt.*;
    * MainFrame_PCM.java is a 1.4 application that requires:
    * MyInternalFrame.java
    public class MainFrame_PCM extends JFrame implements ActionListener
    JDesktopPane desktop;
    public MainFrame_PCM()
    super("Peso Collection Module");
    //Make the big window be indented 50 pixels from each edge
    //of the screen.
    int inset = 50;
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setBounds(inset, inset,
    screenSize.width - inset*2,
    screenSize.height - inset*2);
    //Set up the GUI.
    desktop = new JDesktopPane(); //a specialized layered pane
    createLoginFrame(); //create first "window"
    setContentPane(desktop);
    setJMenuBar(createMenuBar());
    //Make dragging a little faster but perhaps uglier.
    desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    /* This portion creates the Menu Tool Bar.
    // And creates the Menu Toor Bar sub menus.
    // Ining parti na ning code a ini gawa yang
    //menu Bar and Sube menus pra keng Main Menu
    protected JMenuBar createMenuBar()
    JMenuBar menuBar = new JMenuBar();
    //Set up Main Menus
    JMenu menu = new JMenu("Main Menu");
    menu.setMnemonic(KeyEvent.VK_D);
    menuBar.add(menu);
    JMenu menu2 = new JMenu("Maintenance");
    menu2.setMnemonic(KeyEvent.VK_M);
    menuBar.add(menu2);
    ///////////////////// SUB MENUS CODE HERE ///////////////////
    //a submenu
              menu2.addSeparator();
              JMenu submenu = new JMenu("Manage Users");
              submenu.setMnemonic(KeyEvent.VK_S);
              JMenuItem menuItem8 = new JMenuItem("Add New User");
              menuItem8.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_A, ActionEvent.ALT_MASK));
              menuItem8.setActionCommand("adduser");
              menuItem8.addActionListener(this);
              submenu.add(menuItem8);
              JMenuItem menuItem9 = new JMenuItem("Edit User Profile");
              menuItem9.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_E, ActionEvent.ALT_MASK));
              menuItem9.setActionCommand("editusers");
              menuItem9.addActionListener(this);
              submenu.add(menuItem9);
              menu2.add(submenu);
              JMenuItem menuItem10 = new JMenuItem("Delete User");
              menuItem10.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_D, ActionEvent.ALT_MASK));
              menuItem10.setActionCommand("deleteusers");
              menuItem10.addActionListener(this);
              submenu.add(menuItem10);
              menu2.add(submenu);
              //Set up the Maintenance Menu item.
    JMenuItem menuItemMtc = new JMenuItem(" Program Access");
    menuItemMtc.setMnemonic(KeyEvent.VK_U);
    // menuItemMtc.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_L, ActionEvent.ALT_MASK));     
    menuItemMtc.setActionCommand("manage_users");
    menuItemMtc.addActionListener(this);
    menu2.add(menuItemMtc);
              /*--------End of Maintenance Menu item--------*/
    //Set up the Main menu item.
    JMenuItem menuItem = new JMenuItem("Login");
    menuItem.setMnemonic(KeyEvent.VK_L);
    menuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_L, ActionEvent.ALT_MASK));     
    menuItem.setActionCommand("login");
    menuItem.addActionListener(this);
    menu.add(menuItem);
              JMenuItem menuItem2 = new JMenuItem("User Maintenance");
    menuItem2.setMnemonic(KeyEvent.VK_N);
    menuItem2.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_N, ActionEvent.ALT_MASK));     
    menuItem2.setActionCommand("user");
    menuItem2.addActionListener(this);
    menu.add(menuItem2);
              //Set up the QUIT menu item.
    menuItem = new JMenuItem("Quit");
    menuItem.setMnemonic(KeyEvent.VK_Q);
    menuItem.setAccelerator(KeyStroke.getKeyStroke(
    KeyEvent.VK_Q, ActionEvent.ALT_MASK));
    menuItem.setActionCommand("quit");
    menuItem.addActionListener(this);
    menu.add(menuItem);
    /*--------End of Main Menu item--------*/
    return menuBar;
    //////////////////// END OF SUB MENUS HERE ////////////////////
    //React to Sub menu selections. keni la mayayaus deng forms potng me click!
    public void actionPerformed(ActionEvent e)
    if ("login".equals(e.getActionCommand())) //new login fram
    createLoginFrame();
                   else if ("user".equals(e.getActionCommand())) //new temporary ya ini
                   createFrame();
                   else if ("adduser".equals(e.getActionCommand())) //new user frame
                   createManageUserFrame();//call the Manage User Form Functions
                   else if ("editusers".equals(e.getActionCommand())) //new user frame
                   createEditUserFrame();//call the Edit User Form Functions
                   else if ("deleteusers".equals(e.getActionCommand())) //new user frame
                   createDeleteUserFrame();//call the Edit User Form Functions
              else //quit
    quit();
         /*-------------- End Of Sub Menus Reactions ------------*/     
         //Create a new internal frame for User Login
              protected void createLoginFrame()
                   MyLoginInternalFrame frame = new MyLoginInternalFrame();
                   frame.setVisible(true); //necessary as of 1.3
                   desktop.add(frame);
                   try
                        frame.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) {}
              //Create a new internal frame for User Maintenance TEMPORARY YA INI BOI
              protected void createFrame()
                   MyInternalFrame frame = new MyInternalFrame();
                   frame.setVisible(true); //necessary as of 1.3
                   desktop.add(frame);
              try
                        frame.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) {}
              // Create a new internal fram for Manage Users
              protected void createManageUserFrame()
                   ManageUserForm frame = new ManageUserForm();
                   frame.setVisible(true); //necessary as of 1.3
                   desktop.add(frame);
              try
                        frame.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) {}
              // Create a new internal fram for Edit Users
              protected void createEditUserFrame()
                   createEditUserForm frame = new createEditUserForm();
                   frame.setVisible(true); //necessary as of 1.3
                   desktop.add(frame);
              try
                        frame.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) {}
              // Create a new internal fram for Edit Users
              protected void createDeleteUserFrame()
                   createDeleteUserForm frame = new createDeleteUserForm();
                   frame.setVisible(true); //necessary as of 1.3
                   desktop.add(frame);
              try
                        frame.setSelected(true);
                   } catch (java.beans.PropertyVetoException e) {}
    //Quit the application.
    protected void quit() {
    System.exit(0);
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    MainFrame_PCM frame = new MainFrame_PCM();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Display the window.
    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();
    /*File name : MyLoginInternalFrame.java*/
    import javax.swing.JInternalFrame;
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class MyLoginInternalFrame extends JInternalFrame implements ActionListener
         static final int xOffset = 320, yOffset = 200;
         JPasswordField pass_word;
         JTextField user_name;
         JLabel lbl;
         JButton btnclear, btnexit,btnsearch;
         String url;
         Connection connect;
    public MyLoginInternalFrame()
         super("User Login ");
                        //Database Connectivity
                        try
                        url = "jdbc:odbc:Plogbook";
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                        connect = DriverManager.getConnection(url);
                             catch(ClassNotFoundException cnfex)
                             cnfex.printStackTrace();
                             System.err.println("Failed to load JDBC/ODBC driver");
                             System.exit(1);     
                             catch (SQLException sqlex)
                             sqlex.printStackTrace();     
                             catch (Exception ex)
                             ex.printStackTrace();     
                   //Fields to be Set Up
                   Container c = getContentPane();
                   GridLayout ly = new GridLayout(0,3);
                   c.setLayout(ly);
                   //Blank Labels
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" Username:");
                   c.add(lbl);
                   user_name = new JTextField(20);
                   user_name.setToolTipText("Enter Your User Name");
                   c.add(user_name);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" Password:");
                   c.add(lbl);
                   pass_word = new JPasswordField(200);
                   pass_word.setToolTipText("Enter Your Password");
                   c.add(pass_word);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   btnsearch = new JButton("Login");
                   btnsearch.addActionListener(this);
                   c.add(btnsearch);
                   //btnclear = new JButton("Clear");
                   //btnclear.addActionListener(this);
                   //c.add(btnclear);
                   btnexit = new JButton("Cancel");
                   btnexit.addActionListener(this);
                   c.add(btnexit);
                   //Blank Labels
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   lbl = new JLabel(" ");
                   c.add(lbl);
                   setSize(300,150);
                   setLocation(xOffset, yOffset);
                   //Quit the application.
                   protected void quit()
                   System.exit(0);
                   public void actionPerformed(ActionEvent e)
                   // Clear the fields
                        if(e.getSource() == btnclear)
                        user_name.setText("");
                        pass_word.setText("");
                   // Exit the program
                        if(e.getSource() == btnexit)
                        //setVisible(false);
                        quit();
                             // Search the file
                                  if(e.getSource()==btnsearch)
                                            try
                                                 Statement statement=connect.createStatement();
                                                 String sqlQuery ="SELECT * FROM a_user WHERE user_id = '"+ user_name.getText() + "' AND password = '"+ pass_word.getText() + "'";
                                                 ResultSet rs = statement.executeQuery(sqlQuery);
                                                 if(rs.next())
                                                      setVisible(false);
                                                      JOptionPane.showMessageDialog(null,"ACCESS GRANTED");     
                                                      else
                                                           JOptionPane.showMessageDialog(null,"ACCESS DENIED");
                                                           user_name.setText("");
                                                           pass_word.setText("");
                                                 catch (SQLException sqlex)
                                                      sqlex.printStackTrace();          
                                                      JOptionPane.showMessageDialog(null, sqlex.toString());     
                   public static void main(String arg[])
                             MyLoginInternalFrame frm = new MyLoginInternalFrame();
                             frm.show();
    }

  • Why do the menus diseappear? please help.....

    I am quite new to Java and I use project builder on my mac running OSX. Anyway I found some sample code and I was wondering if anybody could help me out. Basically when the app is compiled it draws "Hello World" in the window and there are two menus in the menubar -> 'File' and 'Edit', but when you go to the about box the menus disappear until you either close the aboutbox or bring the focus back to the main window.
    How can I always keep the menus showing when there are multiple windows in the app. Remember that mac menus are fixed to the top of the screen...
    anyway heres the code:
    import java.awt.*;
    import java.awt.event.*;
    import com.apple.mrj.*;
    import javax.swing.*;
    public class test extends JFrame
                          implements  ActionListener,
                                      MRJAboutHandler,
                                      MRJQuitHandler
        static final String message = "Hello World!";
        private Font font = new Font("serif", Font.ITALIC+Font.BOLD, 36);
        protected AboutBox aboutBox;
        // Declarations for menus
        static final JMenuBar mainMenuBar = new JMenuBar();
        static final JMenu fileMenu = new JMenu("File");
        protected JMenuItem miNew;
        protected JMenuItem miOpen;
        protected JMenuItem miClose;
        protected JMenuItem miSave;
        protected JMenuItem miSaveAs;
        static final JMenu editMenu = new JMenu("Edit");
        protected JMenuItem miUndo;
        protected JMenuItem miCut;
        protected JMenuItem miCopy;
        protected JMenuItem miPaste;
        protected JMenuItem miClear;
        protected JMenuItem miSelectAll;
        public void addFileMenuItems() {
            miNew = new JMenuItem ("New");
            miNew.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.Event.META_MASK));
            fileMenu.add(miNew).setEnabled(true);
            miNew.addActionListener(this);
            miOpen = new JMenuItem ("Open...");
            miOpen.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.Event.META_MASK));
            fileMenu.add(miOpen).setEnabled(true);
            miOpen.addActionListener(this);
            miClose = new JMenuItem ("Close");
            miClose.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.Event.META_MASK));
            fileMenu.add(miClose).setEnabled(true);
            miClose.addActionListener(this);
            miSave = new JMenuItem ("Save");
            miSave.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.Event.META_MASK));
            fileMenu.add(miSave).setEnabled(true);
            miSave.addActionListener(this);
            miSaveAs = new JMenuItem ("Save As...");
            fileMenu.add(miSaveAs).setEnabled(true);
            miSaveAs.addActionListener(this);
            mainMenuBar.add(fileMenu);
        public void addEditMenuItems() {
            miUndo = new JMenuItem("Undo");
            miUndo.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.Event.META_MASK));
            editMenu.add(miUndo).setEnabled(true);
            miUndo.addActionListener(this);
            editMenu.addSeparator();
            miCut = new JMenuItem("Cut");
            miCut.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.Event.META_MASK));
            editMenu.add(miCut).setEnabled(true);
            miCut.addActionListener(this);
            miCopy = new JMenuItem("Copy");
            miCopy.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.Event.META_MASK));
            editMenu.add(miCopy).setEnabled(true);
            miCopy.addActionListener(this);
            miPaste = new JMenuItem("Paste");
            miPaste.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.Event.META_MASK));
            editMenu.add(miPaste).setEnabled(true);
            miPaste.addActionListener(this);
            miClear = new JMenuItem("Clear");
            editMenu.add(miClear).setEnabled(true);
            miClear.addActionListener(this);
            editMenu.addSeparator();
            miSelectAll = new JMenuItem("Select All");
            miSelectAll.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.Event.META_MASK));
            editMenu.add(miSelectAll).setEnabled(true);
            miSelectAll.addActionListener(this);
            mainMenuBar.add(editMenu);
        public void addMenus() {
            addFileMenuItems();
            addEditMenuItems();
            setJMenuBar (mainMenuBar);
        public test() {
            super("test");
            this.getContentPane().setLayout(null);
            addMenus();
            aboutBox = new AboutBox();
            Toolkit.getDefaultToolkit();
            MRJApplicationUtils.registerAboutHandler(this);
            MRJApplicationUtils.registerQuitHandler(this);
            setVisible(true);
        public void paint(Graphics g) {
                    super.paint(g);
            g.setColor(Color.blue);
            g.setFont (font);
            g.drawString(message, 40, 80);
        public void handleAbout() {
            aboutBox.setResizable(false);
            aboutBox.setVisible(true);
            aboutBox.show();
        public void handleQuit() {
            System.exit(0);
        // ActionListener interface (for menus)
        public void actionPerformed(ActionEvent newEvent) {
            if (newEvent.getActionCommand().equals(miNew.getActionCommand())) doNew();
            else if (newEvent.getActionCommand().equals(miOpen.getActionCommand())) doOpen();
            else if (newEvent.getActionCommand().equals(miClose.getActionCommand())) doClose();
            else if (newEvent.getActionCommand().equals(miSave.getActionCommand())) doSave();
            else if (newEvent.getActionCommand().equals(miSaveAs.getActionCommand())) doSaveAs();
            else if (newEvent.getActionCommand().equals(miUndo.getActionCommand())) doUndo();
            else if (newEvent.getActionCommand().equals(miCut.getActionCommand())) doCut();
            else if (newEvent.getActionCommand().equals(miCopy.getActionCommand())) doCopy();
            else if (newEvent.getActionCommand().equals(miPaste.getActionCommand())) doPaste();
            else if (newEvent.getActionCommand().equals(miClear.getActionCommand())) doClear();
            else if (newEvent.getActionCommand().equals(miSelectAll.getActionCommand())) doSelectAll();
        public void doNew() {}
        public void doOpen() {}
        public void doClose() {}
        public void doSave() {}
        public void doSaveAs() {}
        public void doUndo() {}
        public void doCut() {}
        public void doCopy() {}
        public void doPaste() {}
        public void doClear() {}
        public void doSelectAll() {}
        public static void main(String args[]) {
            new test();
    }������������������������������������������
    and the coe of the aboutbox
    ������������������������������������������
    //      File:   AboutBox.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class AboutBox extends JFrame
                          implements ActionListener
        protected JButton okButton;
        protected JLabel aboutText;
        public AboutBox() {
            super();
            this.getContentPane().setLayout(new BorderLayout(15, 15));
            this.setFont(new Font ("SansSerif", Font.BOLD, 14));
            aboutText = new JLabel ("About test");
            JPanel textPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 15));
            textPanel.add(aboutText);
            this.getContentPane().add (textPanel, BorderLayout.NORTH);
            okButton = new JButton("OK");
            JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 15));
            buttonPanel.add (okButton);
            okButton.addActionListener(this);
            this.getContentPane().add(buttonPanel, BorderLayout.SOUTH);
            this.pack();
        public void actionPerformed(ActionEvent newEvent) {
            setVisible(false);
    }thanks

    Why not make the about box a dialog in the frame which initially has setVisible(false) and only appears when required by chaning this to true, then back to false on closing.
    That way it shouldn't interfere with the menus, as it is always there, just not always visible...

  • Error rendering/ encoding the menus/ slideshows in iDVD

    I just setup my first dvd using the 08 version of iDVD and exported an hour long movie from FCP6 with chapters. iDVD recognized them and set up 2 chapter pages(1-8 and 9-14) i checked for errors in the map view but there were none and i checked the dvd to see if everything played and wat not, it all checked out. But when I pressed burn it goes to the burn window for a while showing that its encoding/ rendering the menus (chapter menu) and than it stops and a window comes up saying that there was an error during the rendering/ encoding of the menus/slideshows of the dvd. Please help me, what is going wrong? I am using Vintage Vinyl and i did try to save as a disk image but it failed aswell. I also tryed to use all '06 themes and even 3:4 '05 themes but the same exact thing happens. I have 20GB of space on my internal and over 100GB on an external so its not a theme or space issue. im very confused, please help.

    +I have 20GB of space on my internal+
    That is the bare minimum...
    Did you follow chapter markers rules?:
    Make sure no chapter markers are within two seconds of the start or end of the timeline. Make sure no chapter markers are within a transition. Make sure no chapter markers are within two seconds of the end of a transition.
    Check this: http://docs.info.apple.com/article.html?artnum=303148

  • Dvd skips the menus

    I burnt a dvd using idvd. i made a chapter menu as well that branches off of the main menu. I made these chapters in idvd. For the actual movie, all i did was drag and drop the mp4 file onto the main menu.
    Before i burnt the movie, i previewed it in idvd and everything was fine. After i burnt the movie, i played it on my tv and it skips the menus. If i press disc menu on the remote it takes me to the menu and it works fine but i want it to take me to the menu everytime i put the dvd in, instead of playing the movie straight away.
    Can someone please tell me what i have done wrong? Thanks.

    Hi
    a. I don't use .mp4 files with iDVD only iMovie projects that I import from within iDVD.
    Never use the Share/Export to iDVD from within iMovie. Or in FinalCut save as QuickTime
    (no selfcontained, no conversion)
    b. I would in iDVD go to File menu and down to Save as a DiskImage
    Do this and double click on it to extract a virtual hard disk.
    Then I would start DVD-player (in Application folder) and test if this virtual
    copy plays as intended.
    If so. I would burn this with Disk Util tool or Roxio Toast™
    If not. The problem is in iDVD pref file or in the structure or in material used
    eg .mp4, .avi, .wmv, .mp3audio etc.
    • Then I would convert video to streamingDV and audio to .aiff
    • Delete the pref file
    • Secure a minimum of 25Gb free space on internal (booth/start-up) hard disk
    Yours Bengt W

  • "Set canvas" to the marqueed area instead of "crop"?

    Is there a way to "set canvas" to the marqueed area without doing any math or losing the unseen areas like you would with "crop"? I can't find anything like that in the pulldown menus. If not, I'd like to put that on the Photoshop wish list.

    You can't.  But (there's always a but) if you have enough room (i.e. playing time) available in the project you can create a slideshow in iDVD
    and add all of the videos to it.
    If you do that set the Slide Duration time to anything except Manual or Set to Music.  Also do not select an transition.
    When you click on the Create Project button in Magic Movie you'll be able to use the "+" button to add the slideshow to the top menu. 
    OT

  • The UI text of the menus are not readable so it's impossible to work with

    Hi
     I install the photoshop cs6(x64) and i have the following problem. The UI text of the menus(not the toolbar drop down menus) are not readable so it's impossible to work with. After that, I completely uninstall the cs6 photoshop and i tried to install photoshop cc(x64)-with clean install- but the problem still exist.
    Also I tried to change display settings from 1600x900(recommened)but the problem still exist...I send you some photos of the menus to understand better what I mean.Any suggestions? Specifications
    Toshiba Satellite L775-15NWin 7 Home Premium SP1 x64
    Intel Core i5-2430M 2.4GHz
    Ram 8gb
    Monitor 17"
    Geforce GT 525M

    Right click on your desktop and choose Properties, then choose Window Color, Advanced Appearance settings...
    Click on the Message Text to look at your Message Box item settings.  Is the font Segoe UI, 9 point, color black?
    Also, in Photoshop, check your Edit - Preferences - Interface menu.  What is your UI Font Size there?  Try changing it to something else, closing and restarting Photoshop, then changing it back.
    Lastly, you could try resetting your Photoshop preferences to defaults.  Press and hold Command - Shift - Option simultaneously (or Control - Shift - Alt if on a PC) immediately upon cold-starting Photoshop. If you get the keys down quickly enough - and you have to be really quick - it will prompt you to confirm deletion of your current preferences, which will lead to the establishment of a fresh default set. If it does not prompt you, you haven't been quick enough to get the keys down.
    -Noel

  • Creating a "more" button on the menu bar when the menus are more

    Hi,
    I wanted to create a functionality similar to that we can see in eclipse editor. when we open files more than a number, only some of the pages are visible on the editor. we can access the rest from the button which shows the names of files. I am doing a web app which contains many menus. sometimes it may be more than a page can contain.in such cases the page shows a scroll bar. i need to avoid the scroll bar and keep a button towards the right end of the tool bar; when the user clicks on the button, the rest of the menus should be shown there.is there anyways to implement this?
    i have another problem: how can i hilight the currently selected menu? can i do it using java code and a css class?
    Thanks,
    Geet

    Geet wrote:
    Hi,
    I wanted to create a functionality similar to that we can see in eclipse editor. when we open files more than a number, only some of the pages are visible on the editor. we can access the rest from the button which shows the names of files. I am doing a web app which contains many menus. sometimes it may be more than a page can contain.in such cases the page shows a scroll bar. i need to avoid the scroll bar and keep a button towards the right end of the tool bar; when the user clicks on the button, the rest of the menus should be shown there.is there anyways to implement this? Well, count the items and display the button/menu when there are more than which fits on screen.
    i have another problem: how can i hilight the currently selected menu? can i do it using java code and a css class?You normally use CSS for styling, yes.

  • Is there any way to increase the font size in the Creative Cloud. Using a Lenovo Yoga 2 with 14" screen and care barely see the menus

    Is there any way to increase the font size in the Creative Cloud. Using a Lenovo Yoga 2 with 14" screen and care barely see the menus.

    In short, no. There is no fix yet. They only barely acknowledge there is a problem. The "fix" is to enable 200% UI scaling which makes everything comically huge and unusable. This is pretty much of a joke. A really, really EXPENSIVE joke.

  • VGS-1501 Error while opening the canvas in the form module

    Hi All,
    I am getting “VGS-1501: <message not found>” message while opening the canvas. Actually in my machine Oracle Apps R12 is installed. To work on forms I have opened form builder and created a data block manually and created a canvas in the form module manually. To add items on the canvas, when I am clicking on canvas then first I am getting “VGS-1501: <message not found>” error message and then after canvas is getting opened. But here in the canvas there were no items available in the side tool bar.
    Then I decided to build form through wizard. Once the form was created, then when I opened the canvas then again I got the same error message. Here when I tried to run the form, then the form got closed automatically. This problem is related to forms only because I am able to work on Oracle Apps (functionally) and also I am able to develop a report using report builder. Can somebody please help me to fix this issue
    Thanks
    Thahessen

    I got something sililar behaviour when I use different version forms in different version of developer environment. Sometimes your Forms_PATH and REPORTS_PATH may be point ot wrong version.
    This is only a assumption...

  • Internet Download Manager cannot integration with firefox4 itis Look in the menus it works but it does not actually work ?

    internet Download Manager cannot integration with firefox4 its Look in the menus it works but it does not actually work

    IDM may need to be updated to work with Firefox 4.0. You could contact them and make them aware of the problems you are having with their program.

Maybe you are looking for