Jframe calls jframe

hi every body
my problem is :
i have a main Jframe with a button its name is "search", when i click on it , i want a second frame appear with a message like "wait until search completed"and the rest of search code below it when the search completed i make the second frame disapear. this is logically acceptabland easy to do , but when i execute it with this senario the second frame appear and dissapear quickly .
i do not know why inspite of the time of seach is enough to give the second frame the chance to appear .
please help
sorry for my weak language
thanks in advance

Are you sure that the end of the search is what triggers the window to close? It sounds like you are doing some thing like this:
waitFrame = new WaitFrame();
waitFrame.dispose();

Similar Messages

  • Can i call a JMenuBar in a number of JFrame(s) ?

    Hi ,
    I've a program with a number of JFrames.
    I wanted to add a JMenuBar for each frame of my program, this menu bar has the same design code and the same events code in all the program frames, so is there a way to create this JMenuBar once only & call it some how in every JFrame to load it directly instead of writing its same code a lot of times for every JFrame ?
    Thanks ,
    Hesham

    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    class Test{
         public static void main( String[] argv ) throws Throwable {
              for(int i=0; i<10; i++){
                   SuperFrame f = new SuperFrame();
                   f.setLocation(i*10,i*10);
                   f.setSize(400,300);
                   f.setVisible(true);
    class SuperFrame extends JFrame{
         private static final long serialVersionUID = 1L;
          * All the menu item goes here
         JMenuBar mbar = new JMenuBar();
         JMenu menu = new JMenu("Menu");
         JMenuItem menuItem1  = new JMenuItem("Close");
         JMenuItem menuItem2  = new JMenuItem("Exit");
         public SuperFrame(){
              super("Testing");
              this.menu.add(menuItem1);
              this.menu.add(menuItem2);
              this.mbar.add(menu);
              this.setJMenuBar(mbar);
              menuItem1.addActionListener(new ActionListener(){
                   @Override
                   public void actionPerformed(ActionEvent arg0) {
                        dispose();
              menuItem2.addActionListener(new ActionListener(){
                   @Override
                   public void actionPerformed(ActionEvent arg0) {
                        System.exit(0);
    }

  • How to call a private method in a JFrame

    I have a Frame which has some properties like its size, bgcolor plus other parameters, as instance variables. There is a button on the Frame with the caption : "set properties". When one clicks on that button, a new frame should appear via which a user can change the values of the parameters of the main Frame (i.e size, bgcolor,..etc). The user would input the new values in the textfields or radio buttons that are on the new frame, and then click a submit button, which has to exist on the same NFrame. How can I do that so that when the submit button is pressed, the parameters values are updated and so is the display view ?
    I made it this way : I created 2 classes, the main frame and the new Frame. I made the new Frame an instance variable of the main Frame. When the user clicks the " set properties" button on the main Frame, the new Frame is shown. The user enters new values for some of the parameters and clicks submit. The parameters in the new Frame are updated. UP TO HERE EVERYTHING WENT JUST FINE. Now, there is a private method in the main frame that changes the color, size, ...etc of the main frame according to the values stored in the instance variables color, size,...etc. THE QUESTION IS: How can the new Frame display the changes after the values have been updated ? That is, how can it call the "private" method in the main class?? Should the new class be a child class of the main class to be able to access it's private methods ??

    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    import javax.swing.*;
    public class CallingHome
        SkinMod skinMod;
        JPanel panel;
        public CallingHome()
            // send reference so SkinMod can call methods in this class
            skinMod = new SkinMod(this);
            JButton change = new JButton("change properties");
            change.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    skinMod.showDialog();
            JPanel north = new JPanel();
            north.add(change);
            panel = new JPanel();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(north, "North");
            f.getContentPane().add(panel);
            f.setSize(300,100);
            f.setLocation(200,200);
            f.setVisible(true);
        public void setBackground(Color color)
            panel.setBackground(color);
            panel.repaint();
        public static void main(String[] args)
            new CallingHome();
    class SkinMod
        CallingHome callHome;
        Random seed;
        JDialog dialog;
        public SkinMod(CallingHome ch)
            callHome = ch;
            seed = new Random();
            createDialog();
        public void showDialog()
            if(!dialog.isShowing())
                dialog.setVisible(true);
        private void createDialog()
            JButton change = new JButton("change background");
            change.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    callHome.setBackground(getColor());
                    dialog.dispose();
            JPanel p = new JPanel();
            p.add(change);
            dialog = new JDialog();
            dialog.getContentPane().add(p);
            dialog.setSize(200,100);
            dialog.setLocation(525,200);
        private Color getColor()
            return new Color(seed.nextInt(0xffffff));
    }

  • Calling a method on a jFrame from a jPanel that created by the jFrame

    Hi all
    I can not for the life of me work out how to do this.
    Calling a method on a jFrame from a jPanel that created by the jFrame.
    I have used this code to set a handle for one jPanel to another.
    i.e I can create new jpanel and pass in handles from one to another but not back to the jFrame.
    // this is sudo code
      private Panel_Top topPanel;
      private Menu_Panel menuPanel;
      private DataPanel dataPanel;
    //create new
        topPanel = new Panel_Top();
        menuPanel = new Menu_Panel();
        dataPanel = new DataPanel();
    // add handles from one to another
        menuPanel.setDataPanel(dataPanel);
        topPanel.setDataPanel(dataPanel);
        topPanel.setMenu_Panel(menuPanel);
        dataPanel.setMenu_Panel(menuPanel);
    // in each class I use this to set
      public void setDataPanel(DataPanel dataPanel) {
        this.dataPanel = dataPanel;
      }But I can not seam to get a handle back to the jFrame that created it.
    Please help
    as you can see I am trying but no luck so far
    Thanks

    class Life extends JPanel{
          pulic Life( JFrame owner )
                owner.doSomething(); // pass the JFrame to the constructor and feel free to use it
    }[code[                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JFrame instance called from a Thread

    Hi All,
    I have an application that fetches data from a database. I have a thread that displays a 'Please wait' message in a JFrame while the software fetches data from the databse.
    The trouble is that the message does not appear on the JPanel untill the data is completely fetched from the database.
    The frame appears with a button, but no message on it!
    Please help.
    Thanks.
    Anuj.
    Code :
    // calling method
    InformationBox ib = new InformationBox("Please wait while the software fetches data from the database");
    ib.setTitle("Please wait");
    ib.setLocation(100,100);
    ib.setVisible(true);
    ib.pack();
    public class InformationBox extends javax.swing.JFrame implements ActionListener {
    JButton ok = new JButton("OK");
    JPanel text = new JPanel();
    JPanel okp = new JPanel();
    JLabel center = new JLabel();
    FlowLayout f1 = new FlowLayout();
    FlowLayout f2 = new FlowLayout();
    BorderLayout b1 = new BorderLayout();
    String comments ="" ;
    public InformationBox(String sd) {
    this.comments=sd;
    jbInit();
    public void jbInit() {
    this.getContentPane().setLayout(b1);
    text.setLayout(f1);
    text.add(center);
    center.setLayout(new FlowLayout());
    center.setText(comments);
    ok.addActionListener(this);
    okp.setLayout(new FlowLayout());
    okp.add(ok);
    getContentPane().add(center, BorderLayout.CENTER);
    getContentPane().add(okp, BorderLayout.SOUTH);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == ok) {
    //eq.setEnabled(true);
    this.setVisible(false);
    }

    // calling method
    InformationBox ib = new InformationBox("Please wait while the software fetches data from the database");
    ib.setTitle("Please wait");
    ib.setLocation(100,100);
    ib.setVisible(true);
    ib.pack();--------------------------------
    public class InformationBox extends javax.swing.JFrame implements ActionListener {
    JButton ok = new JButton("OK");
    JPanel text = new JPanel();
    JPanel okp = new JPanel();
    JLabel center = new JLabel();
    FlowLayout f1 = new FlowLayout();
    FlowLayout f2 = new FlowLayout();
    BorderLayout b1 = new BorderLayout();
    String comments ="" ;
    public InformationBox(String sd) {
    this.comments=sd;
    jbInit();
    public void jbInit() {
    this.getContentPane().setLayout(b1);
    text.setLayout(f1);
    text.add(center);
    center.setLayout(new FlowLayout());
    center.setText(comments);
    ok.addActionListener(this);
    okp.setLayout(new FlowLayout());
    okp.add(ok);
    getContentPane().add(center, BorderLayout.CENTER);
    getContentPane().add(okp, BorderLayout.SOUTH);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == ok) {
    //eq.setEnabled(true);
    this.setVisible(false);
    }

  • Calling a JDialog in the windowClosing Event of a JFrame

    hi
    As we had seen in many applications when u try to close the application a Dialog box will appear and it will ask whether we have to save it.I want to implement the same thing in my windowClosing Event of the Frame.I tried doing this by calling the Dialog i have created by using the show method in the window closing event of the Frame,but what happens is when i close the frame the Dialog box flickers and disappears.What should i do to avoid this flickering and Disppearing of the Dialog box.I want the Dialog box to stay on the screen.What should i do? any ideas?
    thanks

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class WindowClosingTest extends JFrame {
         public WindowClosingTest() {
              try {
                   setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                   JButton button = new JButton("Close");
                   button.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) { performClose(); }
                   addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we) { performClose(); }
                   getContentPane().add(button);
                   pack();
                   setLocationRelativeTo(null);
                   setVisible(true);
              } catch (Exception e) { e.printStackTrace(); }
         private void performClose() {
              int n = JOptionPane.showConfirmDialog(null, "Close?", "Confirm", JOptionPane.YES_NO_OPTION);
              if (n != 1) { System.exit(0); }
         public static void main(String[] args) { new WindowClosingTest(); }
    }

  • Java.lang.stackoverflowerror issue when calling another jframe

    i created a login screen with a username/password field that i call from my main applicaton. I call the jframe with the following code
      createDirectories();
            startNotes();
            login.start();
            getLists();once it gets to the login.start(); it give the following error
    Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
    at sun.awt.Win32GraphicsConfig.getBounds(Native Method)
    at sun.awt.Win32GraphicsConfig.getBounds(Win32GraphicsConfig.java:240)
    at java.awt.Window.init(Window.java:368)
    at java.awt.Window.<init>(Window.java:407)
    here is the full code for my login.java minus the swing component creation
    import javax.swing.JOptionPane;
    public class loginScreen extends javax.swing.JFrame {
        TESTapplication app = new TESTapplication();
            patientObject patient = new patientObject();
        public loginScreen() {       
            initComponents();        
       //initcomponents removed from here
    private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {                                        
            sendLogin();
        private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {                                         
            System.out.println("User exited application");
            System.exit(3);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {              
                 // start();
        // Variables declaration - do not modify                    
        private javax.swing.JButton btnCancel;
        private javax.swing.JButton btnLogin;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel lblLoginInfo;
        private javax.swing.JPasswordField pswrdFldPassword;
        private javax.swing.JTextField txtFldUsername;
        // End of variables declaration                  
        public void start(){
            new loginScreen().setVisible(true);
        public void sendLogin(){
            if (
                    txtFldUsername.getText().trim().equals("") ||  //trim removes whitespace
                    pswrdFldPassword.getText().trim().equals("") )
                JOptionPane.showMessageDialog(null,"Complete empty field(s)","Warning",JOptionPane.WARNING_MESSAGE);
            } else {
                patient.setUsername(txtFldUsername.getText().trim());
                patient.setPassword(pswrdFldPassword.getText().trim());
                patient.setAction("login");
                app.sendPatient();
    }thanks for all help given

    I only need to call 1 new login screen and no new application... how can i call a
    function from another java file?From a method of any class you can invoke (call) methods of other classes. I use "method" rather than "function" here to emphasise that they are much more than bits of code that do something: they have a context (the object of which they are a method).
    for instance i want to call the start function of the loginScreen.java from the
    testapplication.java. i don't need any new pieces, just want to be able to open the
    loginscreen jframe from the test application jframe.I wondered before why that start() method was creating a new loginScreen, but leaving that aside... One way might be for the TESTapplication class to have a member variable of type loginScreen. When some method of TESTapplication wants to invoke the start() method it just does so:loginScreen myLoginScreen = new loginScreen();
    // much later...
    myLoginScreen.start();There is no need for the loginScreen to have its own TESTapplication member variable since, as you say. "i don't need any new pieces".
    The start() method appears to next to nothing. It makes the loginScreen instance visible. But there's already a public method to do that. Perhaps loginScreen should be a modal JDialog: calling setVisible(true) will allow the login screen to do its thing and not return until it has finished (without blocking the event queue).
    It's all really a bit speculative and will remain so until you break down your application into small pieces: not functions (actions), but classes (types of obejcts including the things they can do.) Each class should have a clear and documented description of what it does.

  • Newbie: How to call a method when a JFrame closed ?

    Hya,
    how I can call a method to perform some operations when the JFrame's close(x) button is pressed?
    thanks in advance

    try this
    (change System.exit(0) if you don't want to close the app)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      public Testing()
        setLocation(300,200);
        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);//<---------
        setSize(300,200);
        addWindowListener(new WindowAdapter(){//<-----------
          public void windowClosing(WindowEvent we){
            someMethod();
            System.exit(0);}});
      public void someMethod()
        JOptionPane.showMessageDialog(this,"Closing...");
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Calling JFrame seems to produce an exception with 10g

    Hi all,
    I have written a couple of line of JAVA to calculate the width of of some text (font dependant). While the small program works fine under windows the same source code crashes in the Oracle PL/SQL environment. As soon as the code 'new JFrame' is executed the exception is raised (the program return -1)
    Is this a normal behaviour for 10g ? Do you see a workaround to get the width of strings ?
    Thanks for help.
    appendix:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "StringMetricFile" AS
    package metrics;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import javax.swing.JFrame;
    public class Metrics
    public static int getWidth(String text, String font_name, int font_size, int font_type) {
    try {
                   JFrame jf = new JFrame(); // this seems to produce the exception
                   FontMetrics fm = jf.getFontMetrics(new Font(font_name, font_type, font_size));
                   return fm.stringWidth(text);
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return -1;
    CREATE OR REPLACE FUNCTION stringWidth(text IN VARCHAR2,
    font_name IN VARCHAR2,
    font_size IN NUMBER,
    font_type IN NUMBER
    Return
    NUMBER
    AS LANGUAGE JAVA NAME 'metrics.Metrics.getWidth(java.lang.String,java.lang.String,
    int, int)
    return java.lang.int';
    go
    BEGIN
    DBMS_OUTPUT.PUT_LINE(stringWidth('Hello world','Arial',12,0));
    END;

    I have written a new implementation without JFrame. Calling the getWidth method produce a strange socket errors (no exception is raised).
    The same source works fine in a Windows environment.
    I have attached the modified source. Any suggestion is welcome.
    appendix:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "StringMetricFile" AS
    package metrics;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    public class Metrics
    public static int getWidth(String text, String font_name, int font_size, int font_type) {
    try {
    Graphics g = (new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB)).createGraphics();
    FontMetrics fm = g.getFontMetrics(new Font(font_name, font_type, font_size));
    return fm.stringWidth(text);
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return -1;
    }

  • Calling modal JFrame from  JFrame?? is it possible

    query desc:
    i have created a frame and there is a button on that frame.
    on push of the button i want a modal frame to open up..
    i am unable to make this modal its modless by default in my code.
    or
    how to put a frame inside a Jdialog
    and calling JDIalog from a button on another frame.
    any help ???

    nileshweb wrote:
    i have created a frame and there is a button on that frame.
    on push of the button i want a modal frame to open up..You can't do this.
    i am unable to make this modal its modless by default in my code.Right, again you can't do this.
    how to put a frame inside a Jdialog
    and calling JDIalog from a button on another frame.And you can't do this either.
    What you need to do is create a class that creates a JPanel, not a JFrame. In your main application (that's within a JFrame) when the JButton is pushed, create a modal JDialog (or perhaps better a JOptionPane) and place the created JPanel in the dialog or optionpane and then show. This will work, and fairly easily.
    Usually even my main application is created in a JPanel (I'm trying not to subclass unless absolutely necessary), and I add the JPanel to a JFrame when I want to show this main app. Later, if I decide that I want to show the main app as a JApplet, it's a trivial thing to just create the JApplet, add my main JPanel to it, and show the JApplet. Programming this way increases your flexibility tremendously.

  • NullPointerException when JFrame.setVisible is called

    Hi,
    We are upgrading our app from JDK 1.2.2 to JDK 1.4.
    App used to work fine with JDK 1.2.2. Now it throws a
    NullPointerException on one of the calls to JFrame.setVisible
    method. Here is the error:
    java.lang.NullPointerException
    at javax.swing.text.PlainView.getLineWidth(PlainView.java:612)
    at javax.swing.text.PlainView.getPreferredSpan(PlainView.java:211)
    at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTex
    tUI.java:1167)
    at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:
    737)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1262)
    at javax.swing.JTextArea.getPreferredSize(JTextArea.java:606)
    at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:76
    7)
    at java.awt.Container.layout(Container.java:980)
    at java.awt.Container.doLayout(Container.java:970)
    at java.awt.Container.validateTree(Container.java:1048)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validateTree(Container.java:1055)
    at java.awt.Container.validate(Container.java:1023)
    at java.awt.Window.show(Window.java:455)
    at java.awt.Component.show(Component.java:1128)
    at java.awt.Component.setVisible(Component.java:1083)
    at com.teoco.events.EventViewerFrame.setVisible(EventViewerFrame.java:29
    7)
    at com.teoco.events.EventViewerFrame.display(EventViewerFrame.java:185)
    at com.teoco.ImportGUI.Desktop.initializeApplication(Desktop.java:654)
    at com.teoco.ImportGUI.Desktop.initializeApplication(Desktop.java:639)
    at com.teoco.ImportGUI.Desktop.<init>(Desktop.java:310)
    at com.teoco.ImportGUI.Desktop.<init>(Desktop.java:337)
    at com.teoco.ImportGUI.Desktop.main(Desktop.java:1197)
    I cannot figure out what could be causing this problem.
    Any help is appreciated.
    Thanks
    Jitendra

    Hi Denis,
    Thanks for the bug link you provided. I looked at the bug they were talking about, it looks similar to what is happening to me, but they were talking about Solaris and Linux. Our app runs on Windows and the report says they did not test the fix on Windows.
    Jitendra

  • JFrame calling another JFrame

    Hello,
    I have a simple question:
    2 java files with 2 JFrames in them
    JFrame1(Cars.java) calls JFrame2(AddCar.java) from actionlistener.
    What I think is wrong is JFrame1 actionListener:
    if(ae.getSource() == CarEdit_btn){
    AddCar objEditAddCar = new AddCar();
    objEditAddCar.EditCar();
    And JFrame2's EditCar() method:
    public void EditCar(){
    AddCar windowAddCar1 = new AddCar();
    windowAddCar1.setTitle("Add Car");
    windowAddCar1.pack();
    windowAddCar1.show();
    AddCarMilage_txt.setText("544");
    The problem is that AddCarMilage_txt.setText("544"); doesnt update the value of the JTextField of JFrame2.
    Any ideas? Thanks
    Or another way to go around for me is, how do I use args[] from main inside the constructor?

    read this:
    http://forum.java.sun.com/thread.jspa?threadID=5199666&messageID=9792440#9792440
    it has also 2 classes and updates the textfield of the other class just copy and paste the code.

  • Custom JPanel moves inside JFrame when Jpanel.paintComponent(...) is called

    I have a custom JPanel (CompassCalculatorPanel) that is created, setup and placed within a custom JFrame (CompassCalcFrame). Calling the JFrame constructor sets this all up and makes the Frame show up. All is good with placement and drawing initially. Then when a user changes the spinner value (change the compass heading) it is supposed to redraw the arrow within the panel. It does this just fine, but on the repaint, and subsequent paints, the Panel ends up being placed in the upper left corner of the frame, rather than at the place I positioned it. I've tried saving the upper left corner placement coordinates and calling setBounds(...) before and after the paintComponent(...) method is called. This has no effect, the panel still resides at 0, 0.
    boldAny help that keeps the panel in place would be appreciated!*bold*
    I am opening a new CompassCalcFrame with the following code from another GUI application like this (but this works from an example program perspective):
    import com.vikingvirtual.flightsim.CompassCalcFrame;
    * @author madViking
    public class Main
        public static void main(String[] args)
            CompassCalcFrame CCF = new CompassCalcFrame();
    }The CompassCalcFrame.java code:
    package com.vikingvirtual.flightsim;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Insets;
    import java.awt.Point;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JSeparator;
    import javax.swing.JSpinner;
    import javax.swing.JTextField;
    * @author madViking
    public class CompassCalcFrame extends JFrame
        private CompassCalculatorPanel ccPanel;
        private JButton closeButton;
        private JLabel frameTitle;
        private JSeparator frameSeparator1;
        private JSpinner hdgSpinner;
        private JTextField neField;
        private JTextField eField;
        private JTextField seField;
        private JTextField sField;
        private JTextField swField;
        private JTextField wField;
        private JTextField nwField;
        private Point ccPanelPoint;
        public CompassCalcFrame()
            super ("Compass Heading Calculator");
            initComponents();
            this.setVisible(true);
            calculateAndDraw();
        private void initComponents()
            this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            this.setLayout(null);
            this.setBackground(Color.BLACK);
            this.setForeground(Color.BLACK);
            Container ccPane = this.getContentPane();
            Dimension panelDim = ccPane.getSize();
            Font buttonFont = new Font("Tahoma", 0, 12);
            Font compassFont = new Font("Digital-7", 0, 24);
            Font titleFont = new Font("Lucida Sans", 1, 14);
            frameTitle = new JLabel();
            frameTitle.setText("Compass Heading Calculator");
            frameTitle.setFont(titleFont);
            frameTitle.setForeground(Color.WHITE);
            closeButton = new JButton();
            closeButton.setText("Close");
            closeButton.setToolTipText("Click to close view");
            closeButton.setFont(buttonFont);
            closeButton.addActionListener(new java.awt.event.ActionListener() {public void actionPerformed(java.awt.event.ActionEvent evt)
                                                                              {closeButtonActionPerformed(evt);}});
            hdgSpinner = new JSpinner();
            hdgSpinner.setFont(compassFont);
            hdgSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 359, 1));
            hdgSpinner.setToolTipText("Enter heading to see angles change");
            hdgSpinner.addChangeListener(new javax.swing.event.ChangeListener() {public void stateChanged(javax.swing.event.ChangeEvent evt)
                                                                                {hdgSpinnerStateChanged(evt);}});
            neField = new JTextField();
            neField.setBackground(Color.BLACK);
            neField.setEditable(false);
            neField.setFont(compassFont);
            neField.setForeground(Color.WHITE);
            neField.setHorizontalAlignment(JTextField.CENTER);
            neField.setBorder(null);
            eField = new JTextField();
            eField.setBackground(Color.BLACK);
            eField.setEditable(false);
            eField.setFont(compassFont);
            eField.setForeground(Color.WHITE);
            eField.setHorizontalAlignment(JTextField.CENTER);
            eField.setBorder(null);
            seField = new JTextField();
            seField.setBackground(Color.BLACK);
            seField.setEditable(false);
            seField.setFont(compassFont);
            seField.setForeground(Color.WHITE);
            seField.setHorizontalAlignment(JTextField.CENTER);
            seField.setBorder(null);
            sField = new JTextField();
            sField.setBackground(Color.BLACK);
            sField.setEditable(false);
            sField.setFont(compassFont);
            sField.setForeground(Color.WHITE);
            sField.setHorizontalAlignment(JTextField.CENTER);
            sField.setBorder(null);
            swField = new JTextField();
            swField.setBackground(Color.BLACK);
            swField.setEditable(false);
            swField.setFont(compassFont);
            swField.setForeground(Color.WHITE);
            swField.setHorizontalAlignment(JTextField.CENTER);
            swField.setBorder(null);
            wField = new JTextField();
            wField.setBackground(Color.BLACK);
            wField.setEditable(false);
            wField.setFont(compassFont);
            wField.setForeground(Color.WHITE);
            wField.setHorizontalAlignment(JTextField.CENTER);
            wField.setBorder(null);
            nwField = new JTextField();
            nwField.setBackground(Color.BLACK);
            nwField.setEditable(false);
            nwField.setFont(compassFont);
            nwField.setForeground(Color.WHITE);
            nwField.setHorizontalAlignment(JTextField.CENTER);
            nwField.setBorder(null);
            frameSeparator1 = new JSeparator();
            frameSeparator1.setForeground(Color.WHITE);
            frameSeparator1.setBackground(Color.BLACK);
            ccPanel = new CompassCalculatorPanel();
            // Add components to pane
            ccPane.add(frameTitle);
            ccPane.add(closeButton);
            ccPane.add(frameSeparator1);
            ccPane.add(nwField);
            ccPane.add(hdgSpinner);
            ccPane.add(neField);
            ccPane.add(wField);
            ccPane.add(ccPanel);
            ccPane.add(eField);
            ccPane.add(swField);
            ccPane.add(sField);
            ccPane.add(seField);
            // Begin Component Layout
            Insets paneInsets = ccPane.getInsets();
            Point P1 = new Point(0, 0);
            Point P2 = new Point(0, 0);
            Point P3 = new Point(0, 0);
            Dimension size = frameTitle.getPreferredSize();
            frameTitle.setBounds((5 + paneInsets.left), (5 + paneInsets.top), size.width, size.height);
            P1.setLocation((5 + paneInsets.left), (5 + paneInsets.top + size.height + 5));
            P2.setLocation((P1.x + size.width + 5), (paneInsets.top + 5));
            size = closeButton.getPreferredSize();
            closeButton.setBounds(P2.x, P2.y, size.width, size.height);
            frameSeparator1.setBounds(P1.x, P1.y, (panelDim.width - paneInsets.left - paneInsets.right), 10);
            P1.setLocation(P1.x, (P1.y + 10 + 5));
            P2.setLocation((P1.x + 50 + 75), P1.y);
            P3.setLocation((P1.x + 50 + 75 + 60 + 75), P1.y);
            nwField.setBounds(P1.x, P1.y, 50, 26);
            hdgSpinner.setBounds(P2.x, P2.y, 60, 26);
            neField.setBounds(P3.x, P3.y, 50, 26);
            P2.setLocation((P1.x + 50 + 5), (P1.y + 26 + 5));
            P1.setLocation(P1.x, (P1.y + 26 + 5 + 87));
            P3.setLocation((P1.x + 50 + 5 + 200 + 5), P1.y);
            wField.setBounds(P1.x, P1.y, 50, 26);
            ccPanel.setBounds(P2.x, P2.y, 200, 200);
            ccPanelPoint = new Point(P2.x, P2.y);
            eField.setBounds(P3.x, P3.y, 50, 26);
            P1.setLocation(P1.x, (P1.y + 26 + 87 + 5));
            P2.setLocation((P1.x + 50 + 80), P1.y);
            P3.setLocation((P1.x + 50 + 80 + 50 + 80), P1.y);
            swField.setBounds(P1.x, P1.y, 50, 26);
            sField.setBounds(P2.x, P2.y, 50, 26);
            seField.setBounds(P3.x, P3.y, 50, 26);
            // End with Frame sizing
            Dimension frameDim = new Dimension((paneInsets.left + 5 + 50 + 5 + 200 + 5 + 50 + 5 + paneInsets.right + 10), (P1.y + 26 + 5 + paneInsets.bottom + 40));
            this.setPreferredSize(frameDim);
            this.setSize(frameDim);
            //this.setSize((paneInsets.left + 5 + 50 + 5 + 200 + 5 + 50 + 5 + paneInsets.right), (P1.y + 26 + 5 + paneInsets.bottom));
        private void closeButtonActionPerformed(java.awt.event.ActionEvent evt)
            this.dispose();
        private void hdgSpinnerStateChanged(javax.swing.event.ChangeEvent evt)
            calculateAndDraw();
        private void calculateAndDraw()
            int angle = (Integer)hdgSpinner.getValue();
            int[] headings = new int[7];
            int addAngle = 45;
            for (int i = 0; i < 7; i++)
                headings[i] = angle + addAngle;
                if (headings[i] >= 360)
                    headings[i] -= 360;
                addAngle += 45;
            neField.setText(String.valueOf(headings[0]));
            eField.setText(String.valueOf(headings[1]));
            seField.setText(String.valueOf(headings[2]));
            sField.setText(String.valueOf(headings[3]));
            swField.setText(String.valueOf(headings[4]));
            wField.setText(String.valueOf(headings[5]));
            nwField.setText(String.valueOf(headings[6]));
            ccPanel.paintComponent(this.getGraphics(), angle);
            ccPanel.setBounds(ccPanelPoint.x, ccPanelPoint.y, 200, 200);
            //ccPanel.repaint(this.getGraphics(), angle);
    }The CompassCalculatorPanel.java code:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.vikingvirtual.flightsim;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Point;
    import java.awt.Stroke;
    * @author madViking
    public class CompassCalculatorPanel extends javax.swing.JPanel
        private int xCent;
        private int yCent;
        public CompassCalculatorPanel()
            super();
        @Override
        public void paintComponent(Graphics g)
            paintComponent(g, 0);
        public void repaint(Graphics g, int angle)
            paintComponent(g, angle);
        public void paintComponent(Graphics g, int angle)
            super.paintComponent(g);
            Dimension panelDim = this.getSize();
            xCent = (panelDim.width / 2);
            yCent = (panelDim.height / 2);
            float[] dashArray = {8.0f};
            Graphics2D g2D = (Graphics2D)g;
            g2D.setColor(new Color(53, 153, 0));
            g2D.fillRect(0, 0, panelDim.width, panelDim.height);
            BasicStroke hdgLine = new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
            BasicStroke northLine = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 10.0f, dashArray, 0.0f);
            Stroke stdStroke = g2D.getStroke();
            // Setup Heading Arrow Points
            Point hdgBottom = new Point(xCent, panelDim.height - 15);
            Point hdgTop = new Point(xCent, 15);
            Point ltHdgArr = new Point(xCent - 10, 20);
            Point rtHdgArr = new Point(xCent + 10, 20);
            // Setup North Arrow Points
            Point nthBottom = new Point(xCent, panelDim.height - 15);
            Point nthTop = new Point(xCent, 15);
            Point ltNthArr = new Point(xCent - 8, 20);
            Point rtNthArr = new Point(xCent + 8, 20);
            // Rotate North Arrow Points
            nthBottom = rotatePoint(nthBottom, (0 - angle), true);
            nthTop = rotatePoint(nthTop, (0 - angle), true);
            ltNthArr = rotatePoint(ltNthArr, (0 - angle), true);
            rtNthArr = rotatePoint(rtNthArr, (0 - angle), true);
            // Draw Heading Line
            g2D.setColor(Color.RED);
            g2D.setStroke(hdgLine);
            g2D.drawLine(hdgBottom.x, hdgBottom.y, hdgTop.x, hdgTop.y);
            g2D.drawLine(ltHdgArr.x, ltHdgArr.y, hdgTop.x, hdgTop.y);
            g2D.drawLine(rtHdgArr.x, rtHdgArr.y, hdgTop.x, hdgTop.y);
            g2D.setStroke(stdStroke);
            // Draw North Line
            g2D.setColor(Color.WHITE);
            g2D.setStroke(northLine);
            g2D.drawLine(nthBottom.x, nthBottom.y, nthTop.x, nthTop.y);
            g2D.drawLine(ltNthArr.x, ltNthArr.y, nthTop.x, nthTop.y);
            g2D.drawLine(rtNthArr.x, rtNthArr.y, nthTop.x, nthTop.y);
            g2D.setStroke(stdStroke);
            // Draw circles
            g2D.setColor(Color.BLUE);
            g2D.setStroke(hdgLine);
            g2D.drawOval(5, 5, (panelDim.width - 10), (panelDim.height - 10));
            g2D.setStroke(stdStroke);
            g2D.fillOval((xCent - 2), (yCent - 2), 5, 5);
            g2D.setStroke(stdStroke);
        private Point rotatePoint(Point p, int angle, boolean centerRelative)
            double ix, iy;
            double hyp = 0.0;
            double degrees = 0.0;
            if (centerRelative == true)
                ix = (double)(p.x - xCent);
                iy = (double)((p.y - yCent)*-1);
            else
                ix = (double)p.x;
                iy = (double)p.y;
            if (ix == 0)
                ix = 1;
            hyp = Math.sqrt((Math.pow(ix, 2)) + (Math.pow(iy, 2)));
            if ((ix >= 0) && (iy >= 0))
                degrees = Math.toDegrees(Math.atan(ix/iy));
            else if((ix >= 0) && (iy < 0))
                degrees = Math.abs(Math.toDegrees(Math.atan(iy/ix)));
                degrees = degrees + 90.0;
            else if ((ix < 0) && (iy < 0))
                degrees = Math.toDegrees(Math.atan(ix/iy));
                degrees = degrees + 180.0;
            else if ((ix < 0) && (iy >= 0))
                degrees = Math.abs(Math.toDegrees(Math.atan(iy/ix)));
                degrees = degrees + 270.0;
            degrees = degrees + angle;
            if (degrees >= 360)
                degrees = degrees - 360;
            if (degrees < 0)
                degrees = degrees + 360;
            double interX = Math.sin(Math.toRadians(degrees));
            double interY = Math.cos(Math.toRadians(degrees));
            interX = interX * hyp;
            interY = ((interY * hyp) * -1);
            if (centerRelative == true)
                p.x = xCent + (int)Math.floor(interX);
                p.y = yCent + (int)Math.floor(interY);
            else
                p.x = (int)Math.floor(interX);
                p.y = (int)Math.floor(interY);
            return p;
    }

    In response to the first couple of comments made about using Absolute positioning (layout null), I took a look at the page on doing layouts, which happens to be the link you sent. I read about each, and decided that a GridBag layout would be best. So I created a new class called CompassCalcGridBagFrame and set it all up using the same components, but with a Grid Bag layout. I encounter the exact same problem.
    Just FYI: I originally created this frame using the NetBeans (6.9.1) Frame form builder. By default that uses the Free Design setting, which creates group layouts for both vertical and horizontal spacing. This is where the problem first came to be. I next used the builder to create an absolute positioning frame, which had the same issue. That is when I started building my frames using code only - no NetBeans GUIs. This is where the absolute layout from scratch code started. Same effect. And now, I've created a Grid Bag layout from code, and same effect. There has to be something I'm missing overall, as this effects all of my different layout designs.
    The one thing from gimbal2's previous comment is, should I be using this custom panel within another panel? I am currently adding all of the components (and in Grid Bag, the GridBag layout) to the frame pane itself. Is that OK, or should I use a generic JPanel, and have the components all within that?
    Here is the code for the newest frame class (CompassCalcGridBagFrame):
    package com.vikingvirtual.flightsim;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.Point;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JSeparator;
    import javax.swing.JSpinner;
    import javax.swing.JTextField;
    * @author madViking
    public class CompassCalcGridBagFrame extends JFrame
        private CompassCalculatorPanel ccPanel;
        private JButton closeButton;
        private JLabel frameTitle;
        private JSeparator frameSeparator1;
        private JSpinner hdgSpinner;
        private JTextField neField;
        private JTextField eField;
        private JTextField seField;
        private JTextField sField;
        private JTextField swField;
        private JTextField wField;
        private JTextField nwField;
        private Point ccPanelPoint;
        public CompassCalcGridBagFrame()
            super ("Compass Heading Calculator");
            initComponents();
            this.pack();
            this.setVisible(true);
            calculateAndDraw();
        private void initComponents()
            this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            Container ccPane = this.getContentPane();
            ccPane.setLayout(new GridBagLayout());
            ccPane.setBackground(Color.BLACK);
            ccPane.setForeground(Color.BLACK);
            Font buttonFont = new Font("Tahoma", 1, 12);
            Font compassFont = new Font("Digital-7", 0, 24);
            Font titleFont = new Font("Lucida Sans", 1, 14);
            frameTitle = new JLabel();
            frameTitle.setText("Compass Heading Calculator");
            frameTitle.setFont(titleFont);
            frameTitle.setHorizontalAlignment(JLabel.CENTER);
            frameTitle.setPreferredSize(new Dimension(220, 25));
            frameTitle.setForeground(Color.BLACK);
            closeButton = new JButton();
            closeButton.setText("Close");
            closeButton.setToolTipText("Click to close view");
            closeButton.setFont(buttonFont);
            closeButton.setPreferredSize(new Dimension(75, 25));
            closeButton.addActionListener(new java.awt.event.ActionListener() {public void actionPerformed(java.awt.event.ActionEvent evt)
                                                                              {closeButtonActionPerformed(evt);}});
            hdgSpinner = new JSpinner();
            hdgSpinner.setFont(compassFont);
            hdgSpinner.setModel(new javax.swing.SpinnerNumberModel(0, -1, 360, 1));
            hdgSpinner.setToolTipText("Enter heading to see angles change");
            hdgSpinner.setPreferredSize(new Dimension(50, 26));
            hdgSpinner.addChangeListener(new javax.swing.event.ChangeListener() {public void stateChanged(javax.swing.event.ChangeEvent evt)
                                                                                {hdgSpinnerStateChanged(evt);}});
            neField = new JTextField();
            neField.setBackground(Color.BLACK);
            neField.setEditable(false);
            neField.setFont(compassFont);
            neField.setForeground(Color.WHITE);
            neField.setHorizontalAlignment(JTextField.CENTER);
            neField.setPreferredSize(new Dimension(50, 26));
            neField.setBorder(null);
            eField = new JTextField();
            eField.setBackground(Color.BLACK);
            eField.setEditable(false);
            eField.setFont(compassFont);
            eField.setForeground(Color.WHITE);
            eField.setHorizontalAlignment(JTextField.CENTER);
            eField.setPreferredSize(new Dimension(50, 26));
            eField.setBorder(null);
            seField = new JTextField();
            seField.setBackground(Color.BLACK);
            seField.setEditable(false);
            seField.setFont(compassFont);
            seField.setForeground(Color.WHITE);
            seField.setHorizontalAlignment(JTextField.CENTER);
            seField.setPreferredSize(new Dimension(50, 26));
            seField.setBorder(null);
            sField = new JTextField();
            sField.setBackground(Color.BLACK);
            sField.setEditable(false);
            sField.setFont(compassFont);
            sField.setForeground(Color.WHITE);
            sField.setHorizontalAlignment(JTextField.CENTER);
            sField.setPreferredSize(new Dimension(50, 26));
            sField.setBorder(null);
            swField = new JTextField();
            swField.setBackground(Color.BLACK);
            swField.setEditable(false);
            swField.setFont(compassFont);
            swField.setForeground(Color.WHITE);
            swField.setHorizontalAlignment(JTextField.CENTER);
            swField.setPreferredSize(new Dimension(50, 26));
            swField.setBorder(null);
            wField = new JTextField();
            wField.setBackground(Color.BLACK);
            wField.setEditable(false);
            wField.setFont(compassFont);
            wField.setForeground(Color.WHITE);
            wField.setHorizontalAlignment(JTextField.CENTER);
            wField.setPreferredSize(new Dimension(50, 26));
            wField.setBorder(null);
            nwField = new JTextField();
            nwField.setBackground(Color.BLACK);
            nwField.setEditable(false);
            nwField.setFont(compassFont);
            nwField.setForeground(Color.WHITE);
            nwField.setHorizontalAlignment(JTextField.CENTER);
            nwField.setPreferredSize(new Dimension(50, 26));
            nwField.setBorder(null);
            frameSeparator1 = new JSeparator();
            frameSeparator1.setForeground(Color.WHITE);
            frameSeparator1.setBackground(Color.BLACK);
            frameSeparator1.setPreferredSize(new Dimension(320, 10));
            ccPanel = new CompassCalculatorPanel();
            ccPanel.setPreferredSize(new Dimension(250, 250));
            GridBagConstraints gbc = new GridBagConstraints();
            // Begin Component Layout
            gbc.insets = new Insets(0, 0, 0, 0);
            gbc.fill = GridBagConstraints.NONE;
            gbc.gridx = 0;
            gbc.gridy = 0;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.FIRST_LINE_START;
            ccPane.add(nwField, gbc);
            gbc.gridx = 1;
            gbc.gridy = 0;
            gbc.gridwidth = 2;
            gbc.gridheight = 1;
            gbc.weightx = 0.4;
            gbc.weighty = 0.4;
            gbc.anchor = GridBagConstraints.PAGE_START;
            ccPane.add(hdgSpinner, gbc);
            gbc.gridx = 3;
            gbc.gridy = 0;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.FIRST_LINE_END;
            ccPane.add(neField, gbc);
            gbc.gridx = 0;
            gbc.gridy = 1;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.LINE_START;
            ccPane.add(wField, gbc);
            gbc.gridx = 1;
            gbc.gridy = 1;
            gbc.gridwidth = 2;
            gbc.gridheight = 1;
            gbc.weightx = 1.0;
            gbc.weighty = 1.0;
            gbc.anchor = GridBagConstraints.CENTER;
            ccPane.add(ccPanel, gbc);
            gbc.gridx = 3;
            gbc.gridy = 1;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.LINE_END;
            ccPane.add(eField, gbc);
            gbc.gridx = 0;
            gbc.gridy = 2;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.LAST_LINE_START;
            ccPane.add(swField, gbc);
            gbc.gridx = 1;
            gbc.gridy = 2;
            gbc.gridwidth = 2;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.PAGE_END;
            ccPane.add(sField, gbc);
            gbc.gridx = 3;
            gbc.gridy = 2;
            gbc.gridwidth = 1;
            gbc.gridheight = 1;
            gbc.weightx = 0.5;
            gbc.weighty = 0.5;
            gbc.anchor = GridBagConstraints.LAST_LINE_END;
            ccPane.add(seField, gbc);
            gbc.gridx = 0;
            gbc.gridy = 3;
            gbc.gridwidth = 4;
            gbc.gridheight = 1;
            gbc.insets = new Insets(10, 5, 10, 5);
            gbc.weightx = 0.6;
            gbc.weighty = 0.6;
            gbc.anchor = GridBagConstraints.CENTER;
            ccPane.add(frameSeparator1, gbc);
            gbc.gridx = 1;
            gbc.gridy = 4;
            gbc.gridwidth = 2;
            gbc.gridheight = 1;
            gbc.anchor = GridBagConstraints.PAGE_START;
            ccPane.add(closeButton, gbc);
        private void closeButtonActionPerformed(java.awt.event.ActionEvent evt)
            this.dispose();
        private void hdgSpinnerStateChanged(javax.swing.event.ChangeEvent evt)
            calculateAndDraw();
        private void calculateAndDraw()
            int angle = (Integer)hdgSpinner.getValue();
            if (angle == -1)
                angle = 359;
            if (angle == 360)
                angle = 0;
            int[] headings = new int[7];
            int addAngle = 45;
            for (int i = 0; i < 7; i++)
                headings[i] = angle + addAngle;
                if (headings[i] >= 360)
                    headings[i] -= 360;
                addAngle += 45;
            hdgSpinner.setValue(Integer.valueOf(angle));
            neField.setText(String.valueOf(headings[0]));
            eField.setText(String.valueOf(headings[1]));
            seField.setText(String.valueOf(headings[2]));
            sField.setText(String.valueOf(headings[3]));
            swField.setText(String.valueOf(headings[4]));
            wField.setText(String.valueOf(headings[5]));
            nwField.setText(String.valueOf(headings[6]));
            ccPanel.paintComponent(this.getGraphics(), angle);
    }

  • How sholud we call one jframe class from another jframe class

    Hi
    In my application i am calling one jframe class from another jframe clas.
    how sholud we make previous jframe inactve when another jframe is invoked?(user sholud not able to make any changes on on parent jframe window when another jframe is invoked)
    Pls reply.

    Sorry for me it is not possible to change existing code,
    pls suggest me any other solution so that i can inactive parent jframe when child jframe execution is going on.

  • Japplet is not able to call a class that extends JFrame in internet Explore

    Hi
    I am doing an application on Japplet.The Japplet class calls anathor class which extends JFrame.When I am running this appication on Applet Viewer it works fine.but when I am running this aplication in internet Explorer the Frame window doesn't come.What might be the problem.
    Thanks
    Srikants

    There is no error or exceptio comming when i am running that application on Internet Explorer.Convert the html page to use the object tag instead of the applet tag.
    The IE build in jre (called msjvm) cannot display JFrame since the version is
    1.1.2 and it has no javax classes.
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • JFrame not showing components when called method in other class

    Hi everyone,
    I am new to SWING,and have this little problem.
    i have created a JFrame which has a button and its calling a method in another class.the result takes much more time(around 3mins) as the call involved with FTP.
    My problem is , i click the button(other componetns also there),and waiting for the result.all the time my Frame doesnt show any of the components,it looks as if the components are added to it.but when the call returns.everything is OK.
    Can any1 help me?
    Thanx in advance
    ethirajan

    http://java.sun.com/docs/books/tutorial/essential/threads/
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html

Maybe you are looking for

  • Question about how wireless networks work

    Hello, This is more of a general question rather than one that is specific to the airport. I have a network with an Airport Express with wireless n, a Macbook Pro with a wireless n card, and a printer that has a wireless g card. Someone told me that

  • Error while connecting to R/3 system

    Hello All, I am trying to connect BW and R/3 system .I have done all the necessary settings : RFC connections, Defined message types, generated partner profile. Now I am trying to connect to R/3 system through RSA1. I picked up the right target host

  • Outbound idoc control recorderror - REFINT field

    I am trying to send orders.orders05 idoc from ecc to xi the message that I get in we02 in ECC is EDI: Field REFINT in control record with value 'T080902134731A ' is invalid Does somebody knows where this field is configured ? when I edited this idoc

  • FlASH DRIVE RECOGNIZED BY TWO OF THREE COMPUTERS

    Have a new Transcend flash drive.  I have three computers: 1 with Windows X and two with Windows 8.  The one with Windows X and one of the ones with Windows 8 (a notebook) recognizes the flash drive.  But the towers desktop with Windows 8 does not. 

  • Hi..can I use the iPad2 camera as a webcam in msn messenger please

    Can I use the iPad 2 camera in man messenger as a webcam please