Visual Class Jframe

Hi !
My problem is about visual class. How can I open JFrame in same window? When I click on a radio button on the JFrame, I want to open an another frame that I created. But I want that first frame must closed. Than another opens.
For example,
WaiterMenu childWindow = new WaiterMenu();                    
childWindow.setVisible(true);with this part of code I can pass to other frame but first one doesn't close. What can I use for this?
Thanks.

One more question.
I wrote it but I got this warning. How can I correct this problem? Where do I have to write this MainMenu.setVisible(false)
Warning :
Cannot make a static reference to the non-static method setVisible(boolean) from the type Window
Part of my code :
private JRadioButton getJRadioButton() {
          if (jRadioButton == null) {
               jRadioButton = new JRadioButton();
               jRadioButton.setBounds(new Rectangle(18, 69, 21, 21));
               jRadioButton.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent e) {
                         WaiterMenu childWindow = new WaiterMenu();                              
                         childWindow.setVisible(true);          
          return jRadioButton;
     }

Similar Messages

  • Eclipse Visual Editor - no "Visual Class"

    I have installed the recent eclipse and eclipse-ve packages. Eclipse says that the Visual Editor is installed. It says the "Visual Editor" is of version 1.4.0 and that the "Visual Editor Property Sheet" is of version 1.5.0.
    As far as I understand, I should now be able to create a new "Visual Class" but this menu option is not appearing. Is there something I'm missing?

    Same issue here.

  • Turning off syn visual window (syn visual class)

    When I start a particular function in a program, I get an error message asking me to turn off the program "syn visual window (syn visual class). I have T510 Thinkpad. Does anyone know how to turn this off? From a Google search, I understand it has something to do the with UltraNav and that the problem is specific to Lenovo Thinkpads.

    back in the day (OS 7/8/9) you had what was called t he extension manager. when i would work in cubase i had an extension set that was stripped down - similar to what you are asking.
    now things are different. OS X is very efficient.
    the only thing you need to do is only run the apps you need to have open (don't have mail, internet, etc. running while recording)
    there are 3rd party apps that will remove window shadows, etc. - but I don't think it is necessary.
    Max out your ram, and only run the apps you need running and you should be fine.

  • Using same databaseClass from each of class (JFrame)

    Hello,
    I build a class named databaseClass, It having void/function getConnection, closeConnecion, getStatement, closeStatement...... That doing all the jobs about database connection and working fine.
    My question is how to let all the classes(JFrame) are accessing ONE databaseClass with optimize preformance.
        private databaseClass dbClass;
        private Connection conn;
        dbClass = new databaseClass();
        conn = dbClass.getConnection();I wonder will the class (databaseClass) be called several time if several classes (JFrame) is opened on the same time? (each of JFrame created one of databaseClass object)
    I only know to create databaseClass object on main project class and pass it through to all of JFrame, But I feel a bit stupid.
    Is there an alternative way to calling SAME ONE databaseClass from every JFrame classes
    Possible? and How? Thanks!!!
    Edited by: fsze88 on Mar 26, 2009 8:20 PM

    Eventually, I tried tidy change of my databaseClass Object
    1) add private static int numConnection=0; as counting number of connection existing
    2) add getInstance() return static databaseClass Object
        public static databaseClass getInstance(){
            ++numConnection;
            return new databaseClass();
        }3) add public void finalize() to do whatever when I removing databaseClass Object
        public void finalize(){
            --numConnection;
        }full source at [http://experts.kennam.com/databaseClass.java|http://experts.kennam.com/databaseClass.java]
    Above are what I known to do to my goal, Any suggestion?!
    Edited by: fsze88 on Mar 28, 2009 11:28 PM

  • Visual Editor cannot show the class extending a visual class of JFrame

    Hi,
    We want to create a base frame (BaseFrame) so that every form in our application extending it to share some common properties.
    But i found that the class (OrderFrame extends BaseFrame) cannot be shown properly in Visual Editor (run is ok).
    Is there any way to resolve it?
    Code Ref:
    BaseFrame.java
    public class BaseFrame extends JFrame {
    public BaseFrame() {
    try {
    jbInit();
    } catch (Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    this.getContentPane().setLayout( null );
    this.setSize( new Dimension(400, 300) );
    this.setTitle( "Standard JFrame" );
    OrderFrame.java
    public class OrderFrame extends BaseFrame {
    public OrderFrame() {
    try {
    jbInit();
    } catch (Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    }

    Olaf,
    When using your own beans it is best to create the bean in one project, and then use it in a second project. So in your example; use Project1.jpr to create, compile, test, debug BaseFrame.java. Then, once you are satisfied with it, use Project2.jpr to create, compile, test, debug MyInternalFrame.java. Your scenario works fine when adopting this approach. However, be sure that MyInternalFrame.java includes the necessary import statement for BaseFrame, and be sure that the classpath for Project2.jpr includes the path to BaseFrame.class. If you are using the default classpath settings for each project (i.e. myclasses) then the classpath concern will be taken care of for you already.
    Enjoy.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by olaf:
    Hi,
    the situation :
    BaseFrame extends JInternalFrame
    and
    MyInternalFrame extends BaseFrame
    Now I want to edit MyInternalFrame in the visual editor.
    I tried that by making a bean of BaseFrame and addiing the bean to the Palette but MyInternalFrame won't show up in the editor,
    anybody knows how to set this up ?
    Thanks,
    -- olaf<HR></BLOCKQUOTE>
    null

  • Visual Class: Set a label in main window from dialog box

    Hi,
    Firstly my project is a visual project and at the time being has only 2 classes, both visual. One a main window and then one a dialog.
    The project is about a gym membership, and what i want it to do at the moment is to set the name text box i have in the main window by typying it in another text box in my dialog. Understand?
    This is my text field method in MainWindow...
    public JTextField getNameTextField() {
              if (NameTextField == null) {
                   NameTextField = new JTextField();
                   NameTextField.setBounds(new Rectangle(164, 28, 193, 26));
              return NameTextField;
         }And my New Member text field in the dialog, called NameDialog
    private JTextField getNewMemberTextField() {
              if (NewMemberTextField == null) {
                   NewMemberTextField = new JTextField();
                   NewMemberTextField.setBounds(new Rectangle(36, 56, 209, 28));
              return NewMemberTextField;
         }In the dialog i have created a button called,"OK" and if i press it without entering a String then an error box appears which all works correctly. Then as you can see if i enter a String here i want this String to be entered and showed in my MainWindow class in the name text box.
    But this is not working and i am having trouble here after the else...
    else {
    GymMembershipMainWindow mainWindow = new GymMembershipMainWindow();                                 mainWindow.getNameTextField().setText(getNewMemberTextField().getText());                              
    NameDialog.this.setVisible(false);Sorry but do you understand what i am trying to do? Apologies if any of it is unclear.
    Would appreciate any help. Thank you.

    Ok well there is quite a bit, but only 2 classes. This is the first class which is the main class.
         package membership;
    import javax.swing.SwingUtilities;
    import java.awt.BorderLayout;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.Dimension;
    import javax.swing.JMenu;
    import java.awt.Rectangle;
    import javax.swing.JMenuItem;
    import javax.swing.JMenuBar;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JRadioButton;
    import javax.swing.ButtonGroup;
    public class GymMembershipMainWindow extends JFrame {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JMenuBar applicationMenuBar = null;
         private JMenu memberMenu = null;
         private JMenuItem changeNameMenuItem = null;
         private JMenuItem changeAddressMenuItem = null;
         private JLabel NameLabel = null;
         private JLabel AddressLabel = null;
         private JTextField NameTextField = null;
         private JTextField AddressTextField = null;
         private JLabel MembershipTypeLabel = null;
         private JRadioButton MonthlyRadioButton = null;
         private JRadioButton AnnualRadioButton = null;
         private JLabel PersonalTrainerLabel = null;
         private ButtonGroup group = new ButtonGroup();
          * This method initializes applicationMenuBar     
          * @return javax.swing.JMenuBar     
         private JMenuBar getApplicationMenuBar() {
              if (applicationMenuBar == null) {
                   applicationMenuBar = new JMenuBar();
                   applicationMenuBar.add(getMemberMenu());
              return applicationMenuBar;
          * This method initializes memberMenu     
          * @return javax.swing.JMenu     
         private JMenu getMemberMenu() {
              if (memberMenu == null) {
                   memberMenu = new JMenu();
                   memberMenu.setText("Member");
                   memberMenu.add(getChangeNameMenuItem());
                   memberMenu.add(getChangeAddressMenuItem());
              return memberMenu;
          * This method initializes changeNameMenuItem     
          * @return javax.swing.JMenuItem     
         private JMenuItem getChangeNameMenuItem() {
              if (changeNameMenuItem == null) {
                   changeNameMenuItem = new JMenuItem();
                   changeNameMenuItem.setText("Change Name");
                   changeNameMenuItem.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                        NameDialog dialog = new NameDialog();
                        dialog.setLocationRelativeTo(GymMembershipMainWindow.this);
                        dialog.setModal(true);
                        dialog.setVisible(true);
              return changeNameMenuItem;
          * This method initializes changeAddressMenuItem     
          * @return javax.swing.JMenuItem     
         private JMenuItem getChangeAddressMenuItem() {
              if (changeAddressMenuItem == null) {
                   changeAddressMenuItem = new JMenuItem();
                   changeAddressMenuItem.setText("Change Address");
              return changeAddressMenuItem;
          * This method initializes NameTextField     
          * @return javax.swing.JTextField     
         public JTextField getNameTextField() {
              if (NameTextField == null) {
                   NameTextField = new JTextField();
                   NameTextField.setBounds(new Rectangle(164, 28, 193, 26));
              return NameTextField;
          * This method initializes AddressTextField     
          * @return javax.swing.JTextField     
         private JTextField getAddressTextField() {
              if (AddressTextField == null) {
                   AddressTextField = new JTextField();
                   AddressTextField.setBounds(new Rectangle(165, 74, 192, 26));
              return AddressTextField;
          * This method initializes MonthlyRadioButton     
          * @return javax.swing.JRadioButton     
         private JRadioButton getMonthlyRadioButton() {
              if (MonthlyRadioButton == null) {
                   MonthlyRadioButton = new JRadioButton();
                   MonthlyRadioButton.setBounds(new Rectangle(171, 119, 73, 21));
                   MonthlyRadioButton.setText("Monthly");
                   group.add(MonthlyRadioButton);
                   MonthlyRadioButton.setSelected(true);
              return MonthlyRadioButton;
          * This method initializes AnnualRadioButton     
          * @return javax.swing.JRadioButton     
         private JRadioButton getAnnualRadioButton() {
              if (AnnualRadioButton == null) {
                   AnnualRadioButton = new JRadioButton();
                   AnnualRadioButton.setBounds(new Rectangle(269, 121, 70, 21));
                   AnnualRadioButton.setText("Annual");
                   group.add(AnnualRadioButton);
              return AnnualRadioButton;
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {                    
                        GymMembershipMainWindow thisClass = new GymMembershipMainWindow();
                        thisClass.setLocationRelativeTo(null);
                        thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        thisClass.setVisible(true);
          * This is the default constructor
         public GymMembershipMainWindow() {
              super();
              initialize();
          * This method initializes this
          * @return void
         private void initialize() {
              this.setSize(500, 300);
              this.setJMenuBar(getApplicationMenuBar());
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setContentPane(getJContentPane());
              this.setTitle("Gym Membership");
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   PersonalTrainerLabel = new JLabel();
                   PersonalTrainerLabel.setBounds(new Rectangle(30, 158, 110, 21));
                   PersonalTrainerLabel.setText("Personal Trainer");
                   MembershipTypeLabel = new JLabel();
                   MembershipTypeLabel.setBounds(new Rectangle(32, 115, 114, 24));
                   MembershipTypeLabel.setText("MembershipType");
                   AddressLabel = new JLabel();
                   AddressLabel.setBounds(new Rectangle(71, 75, 64, 24));
                   AddressLabel.setText("Address");
                   NameLabel = new JLabel();
                   NameLabel.setBounds(new Rectangle(69, 26, 57, 25));
                   NameLabel.setText("Name");
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.add(NameLabel, null);
                   jContentPane.add(AddressLabel, null);
                   jContentPane.add(getNameTextField(), null);
                   jContentPane.add(getAddressTextField(), null);
                   jContentPane.add(MembershipTypeLabel, null);
                   jContentPane.add(getMonthlyRadioButton(), null);
                   jContentPane.add(getAnnualRadioButton(), null);
                   jContentPane.add(PersonalTrainerLabel, null);
              return jContentPane;
    }  //  @jve:decl-index=0:visual-constraint="10,10"and this is my other class. The dialog
    package membership;
    import javax.swing.JPanel;
    import java.awt.Frame;
    import java.awt.BorderLayout;
    import javax.swing.JDialog;
    import javax.swing.JLabel;
    import java.awt.Rectangle;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import java.awt.Color;
    public class NameDialog extends JDialog {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JLabel EnterMemberNameLabel = null;
         private JTextField NewMemberTextField = null;
         private JButton OKButton = null;
         private JButton CancelButton = null;
         private JLabel ErrorLabel = null;
         private String MembersName;
          * @param owner
         public NameDialog() {
              super();
              initialize();
          * This method initializes this
          * @return void
         private void initialize() {
              this.setSize(300, 200);
              this.setTitle("Enter member name");
              this.setContentPane(getJContentPane());
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   ErrorLabel = new JLabel();
                   ErrorLabel.setBounds(new Rectangle(60, 93, 151, 17));
                   ErrorLabel.setForeground(Color.red);
                   ErrorLabel.setText("YOU MUST ENTER A NAME");
                   ErrorLabel.setVisible(false);
                   EnterMemberNameLabel = new JLabel();
                   EnterMemberNameLabel.setBounds(new Rectangle(12, 5, 257, 31));
                   EnterMemberNameLabel.setText("Please enter the new members name below:");
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.setName("");
                   jContentPane.add(EnterMemberNameLabel, null);
                   jContentPane.add(getNewMemberTextField(), null);
                   jContentPane.add(getOKButton(), null);
                   jContentPane.add(getCancelButton(), null);
                   jContentPane.add(ErrorLabel, null);
              return jContentPane;
          * This method initializes NewMemberTextField     
          * @return javax.swing.JTextField     
         private JTextField getNewMemberTextField() {
              if (NewMemberTextField == null) {
                   NewMemberTextField = new JTextField();
                   NewMemberTextField.setBounds(new Rectangle(36, 56, 209, 28));
              return NewMemberTextField;
          * This method initializes OKButton     
          * @return javax.swing.JButton     
         private JButton getOKButton() {
              if (OKButton == null) {
                   OKButton = new JButton();
                   OKButton.setBounds(new Rectangle(33, 118, 72, 26));
                   OKButton.setText("OK");
                   OKButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             if(getNewMemberTextField().getText().equals(""))
                                  ErrorLabel.setVisible(true);
                             else {
                                  GymMembershipMainWindow mainWindow = new GymMembershipMainWindow();
                                  mainWindow.getNameTextField().setText(getNewMemberTextField().getText());                              
                                  NameDialog.this.setVisible(false);
              return OKButton;
          * This method initializes CancelButton     
          * @return javax.swing.JButton     
         private JButton getCancelButton() {
              if (CancelButton == null) {
                   CancelButton = new JButton();
                   CancelButton.setBounds(new Rectangle(181, 119, 79, 27));
                   CancelButton.setText("Cancel");
                   CancelButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             NameDialog.this.setVisible(false);
              return CancelButton;
    The problem i am having is in the OK method in the dialog class. At the 'else' i want the text that is inputted into the text field in the name dialog here, to appear into the text field in the main window for the name.
    Understand me? Sorry. Thanks

  • SetVisible from other class/JFrame

    I hava a JFrame with an JMenuBar and 3 JMenu. I wanted to be visible one Menu for each Guest Member and Admin, so.. i create 3 public methods fot setting visibility but them are called form other JFrame (Login), after i login the MenuActivation 1 2 or 3 are aplayed from 2nd Jframe but nothing hapend. I try doLayout() and stil nothing.
    Cand someone help me? and sorry for my english.
    some of my code:
    // ECommerce JFrame
    public ECommerce() {
            super("E-Commerce Java Application");
            initComponents();
            selectMenu();
        public void selectMenu() {
            ss = new session(); // it will get the access number from a file, first will be 0 and after the login (reload) will be 1 or 2
            if(!ss.isOpen()) activeMenu0();
            else if (ss.getNivAcc()==1) activeMenu1();
            else if (ss.getNivAcc()==2) activeMenu2();
            else activeMenu0();
        public void activeMenu0() {
            System.out.println("HERE-0!!!!!!!!!!!!");
            jm1.setVisible(true);
            jm2.setVisible(false);
            jm3.setVisible(false);
            meniu.doLayout();
            //doLayout();
        public void activeMenu1() {
            System.out.println("HERE-1!!!!!!!!!!!!");
            jm1.setVisible(false);
            jm2.setVisible(false);
            jm3.setVisible(false);
            meniu.doLayout();
            //doLayout();
        public void activeMenu2() {
            System.out.println("HERE-2!!!!!!!!!!!!");
            jm1.setVisible(false);
            jm2.setVisible(true);
            jm3.setVisible(true);
            meniu.doLayout();
            //doLayout();
    // Login JFrame
    int NA = port.getNA(UserID); // NA type of access: Guest Admin Member
    session ss = session.getInstance(); // session is a class made by me
    ss.openSession(UserID, NA); // when the session is opened the access number is writed on a file
    new ECommerce(); // after the data is writed, reload
    // ...P.S: the code is working but it not set my visibility and invisibility

    sorry Well, its not the first time you've been asked to post your question in the proper forum!!

  • Problem visualizing a JFrame while doing other things

    I'm triing to visualize a "Waiting" Window with static labels on it saying "Wait please, this process can take some time..." while doing something like 20000 insert in a database, but the window shows only at the end of the process (when i have to open another window, so it displays for only a millisecond). How can i solve the problem? Code is like this:
    public class myclass extends JFrame {
    // some dichiaration
    public myclass() {
    try{
    jbinit()
    } catch ...
    // do alot of calculation
    private void jbinit() {
    // all the stuff like setsize and labels definition
    }

    You're probably doing the entire work in the Swing thread and block it from doing anything else.
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

  • Impossible to find JFrame class

    I'm on Linux Mandrake 8.2 and when I compile a file which contains:
    import javax.swing.*;
    class Test extends JFrame
    I obtain the following message:
    Cannot find class JFrame
    However I have included in my CLASSPATH the path:
    /usr/j2sdk1.4.0/jre/lib/dt.jar
    And have exported the CLASSPATH but without any result, I obtain always the same message:
    Cannot find class JFrame
    What I can do?
    Thanks,
    -- Gandalf

    I don't know about Linux, but on Windows JFrame is in
    \j2sdk1.4.0-rc\jre\lib\rt.jar. dt.jar is the design-time jar for bean info classes and related .gif images.
    Try adding that to your CLASSPATH instead.
    Bill

  • Eclipse visual editor does not work.

    If I try to create a new visual class two error messages pop up:
    "IWAV0138E Remote VM terminated too soon. See .log file for trace of output."
    "An internal error occurred during: "Create Remote VM for Visual Editor for Java".
    IWAV0171E Could not create a socket connection to remote vm. This is often due to your firewall blocking access from your java to do local access."
    Here is the full error log: http://pastebin.com/m4c700db3
    I have no firewall enabled:
    core@c-laptop:~$ sudo iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    I've read that it could possibly happen due to incorrect /etc/hosts file. Here is mine:
    core@c-laptop:~$ cat /etc/hosts
    # /etc/hosts: static lookup table for host names
    127.0.0.1 c-laptop localhost
    #<ip-address> <hostname.domain.org> <hostname>
    192.168.1.102 n810 n810
    192.168.1.101 serv serv
    # End of file
    Any ideas?

    I'm guessing 'c-laptop' is the name of your machine? My line looks different in /etc/hosts, I just added my name to the end and left the original domain:
    rob ~ $ cat /etc/hosts
    # /etc/hosts: static lookup table for host names
    #<ip-address> <hostname.domain.org> <hostname>
    127.0.0.1 localhost.localdomain localhost rob-thinkpad
    # End of file

  • Using visual editor with a modified component...

    Hi,
    I'm creating an MDI application with eclipse.
    I'm using Visual editor plugin;
    Now I've two visual class like this:
    public class CommonFrame extends JInternalFrame {
      public CommonFrame(){
        super();
    public class specificFrame extends CommonFrame {
      public specificFrame(){
        super();
    }Now when I open specificFrame class in eclipse, Visual editor try to load GUI interface, but it fails to do this and show me this error:
    java.lang.NoSuchMethodException(gui.CommonFrame.<init>())
    I grant the code works fine;
    the only problem is I must modify GUI class manually or
    I must change the code "extend CommonFrame" into "extend JInternalFrame", then graphically modify the class, and then re-change the code.
    Is there a way to resolve the above error?
    Thank you in advance.
    MargNat

    My class has a no-args constructor, that is:
    public specificFrame(/* no args */)
    According to this error message:
    java.lang.NoSuchMethodException(gui.CommonFrame.<init>())gui.CommonFrame doesn't.

  • Missing classes from the javax.swing package?

    Can anyone throw any light on what appears to be a missing class from the javax.swing package?
    When CelsiusConverter.java from The Swing Tutorial (code fragment shown below) is compiled the JFrame class can't be found.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class CelsiusConverter implements ActionListener {
        JFrame converterFrame;Despite the package javax.swing being imported, the compiler does not seem to be be able to find the JFrame class.
    CelsiusConverter.java:14: Class JFrame not found in type declaration.
        JFrame converterFrame;To attempt to solve this issue all the files in jdk1.5.0_02\lib were added to CLASSPATH.
    CLASSPATH was set to C:\Program Files\Java\jdk1.5.0_02\lib\dt.jar;C:\Program Files\Java\jdk1.5.0_02\lib\htmlconverter.jar;C:\Program Files\Java\jdk1.5.0_02\lib\jconsole.jar;C:\Program Files\Java\jdk1.5.0_02\lib\tools.jar;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\lib\ir.idl;C:\Program Files\Java\jdk1.5.0_02\lib\jawt.lib;C:\Program Files\Java\jdk1.5.0_02\lib\jvm.lib;C:\Program Files\Java\jdk1.5.0_02\lib\orb.idl;C:\Program Files\Java\jdk1.5.0_02\demo\jfc\SwingApplet\SwingApplet.jar;.;c:\CoreJavaBook

    This is extremely strange... If you're sure it's not a problem in your code or with your classpath, the only other thing I can think to suggest is re-downloading / installing java

  • How to set focus on opened new JFrame??

    Hi,
    I have a problem:
    I have my active JFrame that I am currently running.
    When I press a JButton I have an action that it opens another JFrame,
    which is minimized (maybe it doesn't have a focus enabled or something)
    How to make the opening JFrame window maximized and make it be the one on the foreground (put the first JRame in background)
    Thanks

    Try this:
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    public class JFrames extends JFrame{
         public JFrames(){
              super();
              // exit on close
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // button to create new JFrame
              JButton button = new JButton("New Frame");
              button.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        // create new instance and maximize it
                        JFrames frame = new JFrames();
                        frame.setExtendedState(frame2.getExtendedState()|frame2.MAXIMIZED_BOTH);
              // panel to add the button to
              JPanel panel = new JPanel();
              panel.setPreferredSize(new Dimension(300, 200));
              panel.add(button);
              this.getContentPane().add(panel);
    // display the frame
    this.pack();
    this.setVisible(true);
         public static void main(String args[]){
              JFrames frames = new JFrames();
    }

  • Eclipse - Visual Editor

    I use the eclipse 3.0 and I have installed the visual editor through Help -> Software Updates -> Find and Install...
    So I believe it�s installed correct, but I�d like to know what should I do to start it. I tried to change the perspective, there ins�t the visual editor option though.
    Does anybody know how to do that?
    Thx

    VE is not started as a different perspective but rather, as of Eclipse 3.0.2 I have installed, it will open a new perspective as you add a new "visual class" to your project.
    A problem I experienced during the initial installation is that Eclipse seems not to be able to build its configuration files all at once.
    The online documentation suggests, if you cannot see "Visual Editor" amongst all of the other installed plugin, to delete the following:
    /configuration/org.eclipse.osgi/manifests
    /configuration/org.eclipse.osgi/.bundledata
    /configuration/org.eclipse.osgi/.state
    and restart the program. This will force Eclipse to rebuild its configuration files.
    (Just to be more careful you could move them instead!).
    Hope this will help.
    Bye

  • Conversion from Visual Age for Java 4.0 to JDeveloper

    How can I export our visual classes correctly? It's work, but I can't open them for visual designe.

    If you'll create a new swing application with a frame in JDeveloper you'll see that JDeveloper uses a JBinit method.
    The code you bring over from Visual Age needs to have a JBinit method also to be able to use the visual editor.
    The code editor should work just fine with your code anyway.

Maybe you are looking for

  • Can't record with Sound Blaster Live Va

    I have a Sound Blaster Li've Value (on-board) card and can't record streaming audio with it. It plays streaming audio fine, and seems to record it, but the resulting wav or mp3 files are "empty", playing them results in silence. I noticed that there

  • Salesorder reference in process order

    Hi all, can any one tell me how sales order reference can be created in a process order....?  Im using the strategy group 52 Regards, Jseph.

  • BPC 7.5NW release

    Hi, What is the GA release date for BPC 7.5 NW version. Is it released on 15th Dec 2009? Who were the ramp-up customers? regards, Lokesh Nandula

  • Problems in query result with infoset and timedep infoobject

    Hi, I have the following situation: infoobject ZEMPLOYEE timedep Infocube 0C0_CCA_C11 (standard cost center/cost element postings) -> infoset with infoobject and infocube linked with outer join My query should show all active employees in one month w

  • Desktop Publishing software

    I'm looking for a desktop publishing program to create a booklet for a club function. It will be a 5x8 size (folded pages) with text, pictures and graphics. There would be 4 pages on each 8.5x11 sheet. I used Pagemaker 10 years ago and it would autom