I cant get a panel to display

Im trying to get a panel to display with a text area, but it wont work.
Here is the code:
public ApplicationTest()
          frame.setContentPane(this);
          frame.setLocation(FRAME_UPPER_LEFT_X_COORD,FRAME_UPPER_LEFT_Y_COORD);
          frame.setSize(new Dimension(FRAME_WIDTH,FRAME_HEIGHT));
          frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
          frame.setTitle(WINDOW_TITLE);
          frame.setResizable(false);
          addMouseListener(this);
          addMouseMotionListener(this);
          addKeyListener(this);
          setFocusable(true);
          scrollPane = new JScrollPane(this);
          GridLayout glayout=new GridLayout();
          setLayout(glayout);
          gbc=new GridBagConstraints();
          /*Creating the Menu Bar*/
          MenuBar=new JMenuBar();
          FileMenu=new JMenu("File");
          EditMenu=new JMenu("Edit");
          HelpMenu=new JMenu("Help");
          NewItem=new JMenuItem("New...");
          OpenItem=new JMenuItem("Open");
          SaveItem=new JMenuItem("Save");
          SaveAsItem=new JMenuItem("Save as...");
          ExitItem=new JMenuItem("Exit");
          MenuBar.add(FileMenu);
          MenuBar.add(EditMenu);
          MenuBar.add(HelpMenu);
          FileMenu.add(NewItem);
          FileMenu.add(OpenItem);
          FileMenu.add(SaveItem);
          FileMenu.add(SaveAsItem);
          FileMenu.add(ExitItem);
          frame.setJMenuBar(MenuBar);
          gbc.weightx=0.5;
          gbc.gridx=0;
          gbc.gridy=0;
          add(TopPanel(),gbc);
          frame.setVisible(true);
     }//End ApplicationTest()
       public JPanel TopPanel()
            JPanel temppanel=new JPanel();
            TextArea=new JTextArea(20,20);
            temppanel.add(TextArea);
            return temppanel;
       }//End TopPanel()If you have any ideas please let me know
thanks
Mike

What IS your ApplicationTest class?
Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and see
http://riters.com/JINX/index.cgi/Suggestions_20for_20Asking_20Questions_20on_20Newsgroups

Similar Messages

  • Cant get ibook to send display through vga cable

    i have a ibook with a broken screen and i have not used it for a year for that reason. i recently boght a vga cable so i could use a external display. but i can not figure out how to get it to work plzzzzzzzzzz help

    Hi shur,
    Well like Rhonda says. Sometimes that tiny connector on the iBook can be problematic, check for dirt and such.
    When you say:
    i have a ibook with a broken screen
    Is the display cracked? no display, black? No backlight w/ a dim image?
    If the 2nd what happened when it failed.
    It would also help to know your exact model CPU speed and size.
    Richard

  • How do I get my panels to display?

    Hi,
    I've written this code to display 4 panels but nothing apart my title bar is appearing, I know it;s something minor. I appreciate your help, thanks, fiona
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Color.*;
    public class CDCollection1 extends JFrame implements ActionListener
    private JTextField title;
         private JTextField artist;
         private JTextField year;
         private JTextField genre;
         private JTextField label;
         private JLabel ltitle;
         private JLabel lartist;
         private JLabel lyear;
         private JLabel lgenre;
         private JLabel llabel;
         private JCheckBox excellent;
         private JCheckBox good;
         private JCheckBox fair;
         private JCheckBox poor;
         private JButton enter;
         private JButton edit;
         private JLabel pic;
         private JPanel images;
         private JPanel details;
         private JPanel ratings;
         private JPanel buttons;
         ItemListener handler = new CheckBoxHandler();
    public CDCollection1()
         super("The ultimate cd organizer");
                   pack();
         setSize(700, 600);
              setVisible(true);
              getContentPane().setLayout(new BorderLayout());
              title = new JTextField("Enter the title of cd ");                    
              artist = new JTextField();
              year = new JTextField();
              genre = new JTextField();
              label = new JTextField();          
              ltitle = new JLabel("Title: ");     
              lartist = new JLabel("Artist: ");
              lyear = new JLabel("Year: ");
              lgenre = new JLabel("Genre: ");
              llabel = new JLabel("Label: ");                         
              excellent = new JCheckBox("Excellent", true);
              good = new JCheckBox("Good");
              fair = new JCheckBox("Fair");
              poor = new JCheckBox("Poor");           
              enter = new JButton("Enter Details");
              edit = new JButton("Edit Details");
         pic = new JLabel("",new ImageIcon("desktop/pic.jpg"),
              JLabel.CENTER);
              buildImagesPanel();                                                                                                                             
              buildDetailsPanel();
              buildRatingsPanel();
              buildButtonsPanel();
              add(details, BorderLayout.NORTH);
              add(images, BorderLayout.CENTER);
              add(ratings, BorderLayout.EAST);
              add(buttons, BorderLayout.SOUTH);
    private void buildImagesPanel()                                                            
              images = new JPanel();
                   images.setLayout(new FlowLayout() );
                   images.add(pic);
                   this.setContentPane(images);
         private void buildDetailsPanel()                                                                                                                                                                                    
              details = new JPanel();
                   details.setLayout(new GridLayout(2, 4, 20, 20 ) );
                   details.add(ltitle);
                   details.add(title);
                   details.add(lartist);
                   details.add(artist);
                   details.add(lyear);
                   details.add(year);
                   details.add(lgenre);
                   details.add(genre);
                   details.add(llabel);
                   details.add(label);     
                   details.setBorder(BorderFactory.createTitledBorder(
                   "Cd Details"));
                   title.addActionListener( this );
                   artist.addActionListener( this );
                   year.addActionListener( this );
                   genre.addActionListener( this );
                   label.addActionListener( this );      
                   this.setContentPane(details);                                              
         private void buildRatingsPanel()     
              ratings = new JPanel();
              ratings.setLayout(new GridLayout(5, 1, 10, 20 ) );
              ratings.setBorder(BorderFactory.createTitledBorder("Cd Ratings")); //Adds listeners to checkbox items
              excellent.addItemListener(handler);
              good.addItemListener(handler);
              fair.addItemListener(handler);
              poor.addItemListener(handler);
              this.setContentPane(ratings);           
              } //Closes method
         private void buildButtonsPanel()
              buttons = new JPanel();
              enter.setBorder(BorderFactory.createRaisedBevelBorder());
              edit.setBorder(BorderFactory.createRaisedBevelBorder());
              enter.addActionListener( this );
              edit.addActionListener( this );
    this.setContentPane(buttons);
         public void actionPerformed(ActionEvent evt)
         {if ((evt.getSource() == title) || (evt.getSource() == enter))
                   {String titleText = title.getText();          
                   ltitle.setText("Title:    " + titleText);               //After printing text to JLabel, hides the textfield            
                   title.setVisible(false);          
         if ((evt.getSource() == artist) || (evt.getSource() == enter))
         {String artistText = artist.getText();
                 lartist.setText("Artist:    " + artistText);         
                 artist.setVisible(false);      
         if ((evt.getSource() == year) || (evt.getSource() == enter))
    {String yearText = year.getText();             
                   lyear.setText("Year:  " + yearText);            
                   year.setVisible(false);                 
         if ((evt.getSource() == genre) || (evt.getSource() == enter))
                   {String genreText = genre.getText();              
                  lgenre.setText("Genre:     " + genreText);            
                   genre.setVisible(false);               
         if ((evt.getSource() == label) || (evt.getSource() == enter))
              {String labelText = label.getText();            
                    llabel.setText("Label:   " + labelText);              
                    label.setVisible(false);                  
         if (evt.getSource() == edit)
              {title.setVisible(true);
                     artist.setVisible(true);
                     year.setVisible(true);
                     genre.setVisible(true);
                     label.setVisible(true);
    private class CheckBoxHandler implements ItemListener
         public void itemStateChanged (ItemEvent e)
         if ( e.getSource() == excellent )
         if ( e.getStateChange() == ItemEvent.SELECTED )
         excellent.setForeground(Color.blue);
         else
         excellent.setForeground(Color.black);
         if ( e.getSource() == good )
         if ( e.getStateChange() == ItemEvent.SELECTED )
         good.setForeground(Color.blue);
         else
         good.setForeground(Color.black);
         if ( e.getSource() == fair )
         if ( e.getStateChange() == ItemEvent.SELECTED )
         fair.setForeground(Color.blue);
         else
         fair.setForeground(Color.black);
         if ( e.getSource() == poor )
         if ( e.getStateChange() == ItemEvent.SELECTED )
         poor.setForeground(Color.blue);
         else
         poor.setForeground(Color.black);
         public static void main(String[] args){ 
    CDCollection1 cd = new CDCollection1();
                   cd.getContentPane();
    }

    I would suggest setting the minimum sizes for the panels etc. Otherwise the minimum size can default to 1 pixel x 1 pixel.

  • Video editing from my camcorder. i cant get my time date display to display when i upload from ny cam corder to my computer why is this.

    why doesnt the time date etc display that i have set on my camcorder to display during playback ,why does it not display when i upload my video to my imac...

    Hang on...
    You can only authorise the songs you purchase from the iTunes Store to play on five computers.
    You can download and install iTunes (the iTunes programme) onto as many computers as you wish.
    Two different things.
    Assuming therefore, that your problem is that you have authorised five computers, but now no longer have some of them, you need to de-authorise all your computers and then re-authorise the computers you still have.
    To de-authorise your computers, go to your account in the iTunes Store and look for the Deauthorise All button.

  • TS4022 cant get icloud control panel to load correctly to use outlook 2013

    i cant get control panel to load correctly to allow me to set up sync functions  to my outlook 2013 on my pc

    Solved.  Uninstall iCloud Control Panel from Windows 8 machine (use Control Panel).  Restart, reinstall iControl 2.0.

  • Ghost 970 6gb mini display port to Asus pg278Q 144hz cant get to work

    I am using a straight mini display port cable to display port no adapter and I can only get 120hz. It seems like it has to do with the fact the monitor is using the intel 4600 gpu instead of the 970m. Is there anyway around this? I changed the setting in nvidia control panel to use it all the time but does not help. Is there any setting I can do?
    I cant get 144hz and therefore cannot get g-sync to work. I have searched these forums but cant seem to find a clear answer.

    Currently none of MSI laptops support G-Sync, only the dock for GS30 supports (because it's actually a desktop).
    I heard MSI they are still working on this but not sure if current models can be patched to support G-Sync or only new models support.

  • Has anyone found a solution for the error "The iCloud Control Panel did not install properly".  I'm using windows 7 prof 64 and outlook 2010 and cant get to cloud to winkd ot my mail, contacts, calendar.

    Has anyone found a solution for the error "The iCloud Control Panel did not install properly".  I'm using windows 7 prof 64 and outlook 2010 and cant get to cloud to winkd ot my mail, contacts, calendar.  Cloud control panel version 2.0.

    Has anyone found a solution for the error "The iCloud Control Panel did not install properly".  I'm using windows 7 prof 64 and outlook 2010 and cant get to cloud to winkd ot my mail, contacts, calendar.  Cloud control panel version 2.0.

  • Cant get external Monitor to run under Mountain Lion with Dr. Bott Mini Display port Adapter and Mac book Pro Retina!

    Hey there,
    somehow I cant get my Zalman Trimon Monitor to run on my new Mac book pro (2012, Retina). I tried hooking it up with the Dr. Bott Mini Display port Adapter see here  ( http://www.google.de/products/catalog?client=safari&rls=en&oe=UTF-8&redir_esc=&q =dr.+bott+mini+displayport&um=1&ie=UTF-8&tbm=shop&cid=9085840057573220630&sa=X&e i=rHMeULWUNo7ysgaZvYGYAg&ved=0CHIQ8gIwBg#ps-sellers )
    Neither on my new mac book (with thunderbold) nore with the 2010 Mac book pro 13 inch from my girlfriend both running Mountain Lion, would it work. Does anyone has the same troubles or knows a reason or fix? The monitor definitly works (tried with my old mac book) and this is already the second adapter I use, since I thought maybe the adapter doesnt work!
    Help appreciated!

    Hm, i cannot reproduce the kernel_task thing right now, but this is my temp after working with 2 screens for 10 minutes. is this normal?
    100° cpu, 96° on the diode, and 78 on GPU chip? it even was 82 once.
    when do i reach critical limits?
    apple?

  • I am getting a Remote Panel displayed on the remote display outside of browser. How tdo I force the panel to display in browser.

    I have several machines running LabVIEW 8.2.1 my application uses remote panels embedded in a browser to display the front panel of the running VI. One machine is responding with the brower window coming up, but when the VI is launched it is displayed on the remote machine as a stand-alone remote front panel. About half of the machines have had InternetToolkit intalled, at least one machine that is working does not. the machine in question does not. Could this be part of the problem.
    The enclosing web pages are generated by a .Net web server running on port 80, LabVIEW web server on port 81.
    Example object block from the generated page. Other than machine and vi information I do not se any differences between the applications.
    <!-- LVRemotePanel -->
    <OBJECT ID="LabVIEWControl" BORDER=1
        CLASSID="CLSID:A40B0AD4-B50E-4E58-8A1D-8544233807A​E"
        CODEBASE="ftp://ftp.ni.com/support/labview/runtime/windows/8​.2/LVRunTimeEng.exe"
        WIDTH="722" HEIGHT="740" >
        <PARAM name="server" value="http://hostname.domain.class:81" />
     <PARAM name="LVFPPVINAME" value="Force.vi">
     <param name="REQCTRL" value="true">
     <EMBED src="http://hostname.domain.class:81/.LV_FrontPanelProt​ocol.rpvi82" LVFPPVINAME="Force_13.vi"
     REQCTRL="true"  WIDTH=722 HEIGHT=740 TYPE="application/x-labviewrpvi82"
     PLUGINSPAGE="http://digital.ni.com/express.nsf/express?openagen​t&code=ex3e33&">
      </EMBED>
    </OBJECT>
    Any thoughts or help greatly appreciated.
    Thanks,
    Phil

    Kevin,
    Thanks for the reply.
    Attached is a screen shot of the problem. This is from my home machine which does not have a LabVIEW environment installed, but does have runtime plug-ins for 7.1 & 8.2.1. I also get similar results on my development machines.
    The serving machines are all on campus.
    The remote front panel on the left is what I expected to see embedded in the 'loading ....' field on the Web page on the right.
    The application [ The iLab Project ] is complex and uses a collection of .Net Web Services to provide access to remote labs using the Internet.
    Access to an iLab Lab Server running on port 80 is authorized by a Service Broker, normally running on another machine. The Lab Server, LabVIEW environment and measurement hardware are normally on the same machine, iLab Lab Server using port 80, LabVIEW WebServer using port 81.
    Once the user is authorized and redirected to the Lab Server the Lab Server ensures that LabVIEW is running and the specified VI is loaded, a web page is generated on port 80 that includes the OBJECT block to display the front panel from port 81. Example OBJECT block included in my original post.
    I have used this code on three other 8.2.1 Lab Servers with different VI's and the Front panel is displayed in the web page as expected.
    Variations of the code have been used since LabVIEW 7.0. Prior to version 8.2 the InternetToolkit, GWeb Server and a custom CGI VI were used to generate the contents of an in-line frame to display the Front Panel. Since 8.2 I generate the Object block directly as part of the aspx processing. Is it possible I need the InternetTookit installed even if it is not used, I'm pretty sure one of my working systems has never had the toolkit installed, the machine in question has not.
    I hope this makes my problem clearer, any help, pointers or further questions will be appreciated.
    Phil
    Attachments:
    remotePanelBehavior1.jpg ‏216 KB

  • Cant get adobe to display on screen

    Cant get adobe to display on screen!   Anyone know?

    Adobe what? Adobe is a company, one who makes a number of software products. You'll need to tell us what software it is you're trying to use and the exact nature of the problem before anyone can offer advice. It will also help if you tell us what version of Mac OS X your system is running.
    Adobe has their own forums, by the way. You'll probably be most likely to get help in using their products there:
    http://forums.adobe.com/community/
    Regards.

  • HT1212 my ipod has "ipod is disabled connect ti itunes" but it will not let me put in the passcod or anything! i cant get off this display?

    my ipod has "ipod is disabled connect ti itunes" but it will not let me put in the passcod or anything! i cant get off this display?

    You have to restore:
    Forgotten Passcode or device disabled after entering wrong passcode

  • Cant get subpanels to show

    Hi i have an application that uses subpanels within a panel. For some reason only one (the northern region panel) is showing up and i cannot figure out why. I have banged my head for hours and cant get it to work . If any one has any suggestions it would be greatly appreciated...thanks in advance!
    import  java.awt.*;
    import  java.awt.event.*;
    import  javax.swing.*;
       A GUI application with a button for which the number
       of clicks is kept track of and displayed
       @author Jared Letendre
       @version 09-18-07
    public class NicerDiceRoller extends GameDie
           creates a NicerDiceRoller frame
           @param args not used here
        public static void main(String args[])
            RollerFrame mainFrame = new RollerFrame();
            mainFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );   
            mainFrame.setVisible(true);
       A frame with a panel containing six labels and three buttons
    class RollerFrame extends JFrame
           constructs a RollerFrame frame instance
        public RollerFrame()
            this.setTitle("Dice Roller");
            this.setSize(this.DEFAULT_WIDTH, this.DEFAULT_HEIGHT);
            // add RollerPanel panel to frame
            RollerPanel panel = new RollerPanel();
            this.add(panel);
        // data fields
        private final static int DEFAULT_WIDTH = 400;
        private final static int DEFAULT_HEIGHT = 400;
       A panel with six labels and three buttons, that displays the value of one of three dice
       that are rolled when each button has been clicked. Keeps track of sum of all rolls
    class RollerPanel extends JPanel
           constructs a RollerPanel panel instance
        public RollerPanel()
            this.setLayout(new BorderLayout());
            // create the labels for the northern panel
            JPanel nPanel = new JPanel();
            this.add(nPanel, BorderLayout.NORTH);
            JLabel welcome = new JLabel("Nicer Dice Roller");
            JLabel myName = new JLabel("By: Jared Letendre");
            welcome.setForeground(Color.BLUE);
            nPanel.add(welcome);
            nPanel.add(myName);
            // create the label for the southern panel
            JPanel sPanel = new JPanel();
            rollValue = new JLabel();
            rollValue.setForeground(Color.BLUE);
            this.add(sPanel, BorderLayout.SOUTH);
            sPanel.add(rollValue);
            // create the spacer panels for east and west regions
            JPanel leftPanel = new JPanel();
            JLabel leftSpace = new JLabel("     ");
            this.add(leftPanel, BorderLayout.WEST);
            JPanel rightPanel = new JPanel();
            JLabel rightSpace = new JLabel("     ");
            this.add(rightPanel, BorderLayout.EAST);
            leftPanel.add(leftSpace);
            rightPanel.add(rightSpace);
            // create the labels and buttons for the center panel
            JPanel cPanel = new JPanel();
            cPanel.setLayout(new GridLayout(3, 2, 10, 5));
            this.add(cPanel, BorderLayout.CENTER);
            JButton die1 = new JButton("Roll Dice #1");
            die1.setActionCommand("firstDie");
            die1.setForeground(Color.BLUE);
            die1.setBackground(Color.RED);
            cPanel.add(die1);
            JButton die2 = new JButton("Roll Dice #2");
            die2.setActionCommand("secondDie");
            die2.setForeground(Color.BLUE);
            die2.setBackground(Color.RED);
            cPanel.add(die2);
            JButton die3 = new JButton("Roll Dice #3");
            die3.setActionCommand("thirdDie");
            die3.setForeground(Color.BLUE);
            die3.setBackground(Color.RED);
            cPanel.add(die3);
            rollSum = new JLabel();
            dice1Count = new JLabel();
            dice2Count = new JLabel();
            dice3Count = new JLabel();
            cPanel.add(dice1Count);
            cPanel.add(dice2Count);
            cPanel.add(dice3Count);
            // add labels and button to this panel
            this.add(rollSum);
            // create button action (so dice will be rolled),
            //    and associate that action with corresponding button
            RollerAction action = new RollerAction();
            die1.addActionListener(action);
            die2.addActionListener(action);
            die3.addActionListener(action);
        } // end RollerPanel constructor
           An action listener that rolls a dice based on what button is clicked
        private class RollerAction implements ActionListener
               decides which button was clicked and rolls the corresponding dice
               displays value of that roll
               accumulated the total of the three dice and displays it.
            public void actionPerformed(ActionEvent event)
                if((event.getActionCommand()).equals("firstDie"))
                     dice1.roll();
                     RollerPanel.this.rollValue.setText("Dice 1 rolled a: " + dice1.getTop());
                     temp1 = dice1.getTop();
                     RollerPanel.this.dice1Count.setText("Dice 1 rolled " + dice1.getNumRolls() + " times");
                if((event.getActionCommand()).equals("secondDie"))
                     dice2.roll();
                     RollerPanel.this.rollValue.setText("Dice 2 rolled a: " + dice2.getTop());
                     temp2 = dice2.getTop();
                     RollerPanel.this.dice2Count.setText("Dice 2 rolled " + dice2.getNumRolls() + " times");
                if((event.getActionCommand()).equals("thirdDie"))
                     dice3.roll();
                     RollerPanel.this.rollValue.setText("Dice 3 rolled a: " + dice3.getTop());
                     temp3 = dice3.getTop();
                     RollerPanel.this.dice3Count.setText("Dice 3 rolled " + dice3.getNumRolls() + " times");
                total = temp1 + temp2 + temp3;
                RollerPanel.this.rollSum.setText("Your total roll is: " + total);
        // data fields for RollerPanel
        int total = 0;
        int temp1, temp2, temp3;
        JLabel rollValue;
        JLabel rollSum;
        JLabel dice1Count;
        JLabel dice2Count;
        JLabel dice3Count;
        GameDie dice1 = new GameDie();
        GameDie dice2 = new GameDie();
        GameDie dice3 = new GameDie();
    } // end of class RollerPanelEdited by: jaredL on Oct 6, 2007 12:14 PM

    this line, near end of RollerPanel constructor is the problem
    this.add(rollSum);
    you've set RollerPanel as a BorderLayout, so by not specifying 'where' in the BorderLayout
    rollSum is to go, it defaults to CENTER, effectively knocking out cpanel (the panel with the buttons)

  • Cant get JProgressBar to work!

    i am trying to get a progress bar to pop up while a load fo code is being processed then disapear when it is finished, but unfortuantely i cant get it to appear until all the code is processed and the comptuer has nothing better to do than to show my progress bar, by which time ti is too late!
    folowing is some of my code
    private void JButActionPerformed1()
            jProgressBar1.setIndeterminate(false);
            jProgressBar1.setMinimum(0);
            jProgressBar1.setMaximum(100);
            this.getContentPane().add(bar1);
            jProgressBar1.setVisible(true);
            jProgressBar1.setValue(0);
            progbaratmpt1 atmpt1 = new progbaratmpt1();
            show();
            timer1 = new Timer(300,
                    new ActionListener()
                        public void actionPerformed(ActionEvent evt)
                            if ((counter % 4) == 0)
                                jProgressBar1.setValue(0);
                            if ((counter % 4) == 1)
                                jProgressBar1.setValue(33);
                            if ((counter % 4) == 2)
                                jProgressBar1.setValue(66);
                            if ((counter % 4) == 3)
                                jProgressBar1.setValue(100);
                            counter++;
            progbaratmpt1a();
            timer1.start();
            //timer1.stop();
    public void progbaratmpt1a()
          try
            Thread.sleep(2000);
        catch (InterruptedException e1) {}
      }i have been stuck on this for quite some time, and for some reason no matter what i try nothing works, any help would be greatly appreciated, i am using 1.4.2_05 on win xp. i am just using this code as an example as the real code would be too long, in this example, when i hit the button , it waits 2 secodns then displays my progressbar instead of displaying it straight away.
    thanks again
    chris

    sorry, i had that in my code as well, and never put it in:-
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import java.awt.Button;
    import java.awt.Rectangle;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    import javax.swing.Timer;
    import Project.progbaratmpt1;
    import oracle.jdeveloper.layout.XYConstraints;
    public class progressbarattempt extends JFrame
        private Button button1 = new Button();
        private JProgressBar jProgressBar1 = new JProgressBar();
        JProgressBar bar1 = new JProgressBar();
        JPanel panel = new JPanel();
        private Timer timer;
        private int counter;
        Timer timer1;
        public progressbarattempt()
            try
                jbInit();
            catch (Exception e)
                e.printStackTrace();
        private void jbInit() throws Exception
            this.getContentPane().setLayout(null);
            button1.setLabel("show progress bar");
            button1.setBounds(new Rectangle(0, 0, 140, 50));
            jProgressBar1.setBounds(new Rectangle(205, 55, 130, 50));
            jProgressBar1.setIndeterminate(true);
            //this.getContentPane().add(jProgressBar1, null);
            this.getContentPane().add(button1, null);
            button1.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent e)
                        JButActionPerformed1();
            this.setSize(500, 200);
            this.getContentPane().add(jProgressBar1, null);
            jProgressBar1.setVisible(false);
            this.setVisible(true);
        private void JButActionPerformed1()
            jProgressBar1.setIndeterminate(false);
            jProgressBar1.setMinimum(0);
            jProgressBar1.setMaximum(100);
            this.getContentPane().add(bar1);
            jProgressBar1.setVisible(true);
            jProgressBar1.setValue(0);
            progbaratmpt1 atmpt1 = new progbaratmpt1();
            show();
            timer1 = new Timer(300,
                    new ActionListener()
                        public void actionPerformed(ActionEvent evt)
                            if ((counter % 4) == 0)
                                jProgressBar1.setValue(0);
                            if ((counter % 4) == 1)
                                jProgressBar1.setValue(33);
                            if ((counter % 4) == 2)
                                jProgressBar1.setValue(66);
                            if ((counter % 4) == 3)
                                jProgressBar1.setValue(100);
                            counter++;
            try
                Thread.sleep(2000);
            catch (InterruptedException e1) {}
            timer1.start();
            //timer1.stop();
        public static void main(String[] args)
            progressbarattempt attempt = new progressbarattempt();
    }

  • I deleted "Boot Camp" and I cant get it back?

    Hi ppl!
    I accidentally deleted "boot camp" and now i cant get it back. I have tried the Macbook Pro Application Install CD but it did not install Boot Camp! Hope somebody can help me

    If you mean Boot Camp Assistant then see the following:
    How Restore Deleted or Missing OS X Components
    A few of the basic OS X installed applications can be restored from the Optional Installs installer located in the Optional installs folder on your Installer DVD. However, if what you need is not there then follow the instructions below.
    How to Use Pacifist to Restore Deleted or Missing OS X Components
    Insert the OS X Installer DVD into the optical drive. Use a simple utility like TinkerTool to toggle invisibility so you can see invisible items. Alternatively, open the Terminal application in your Utilities folder and at the prompt enter the following:
    defaults write com.apple.finder AppleShowAllFiles Yes
    Press RETURN.
    To turn off the display of invisible files repeat the above command substituting No for Yes.
    The install packages are located in the /System/Installation/ folder on the DVD.
    Download the shareware utility Pacifist from VersionTracker or MacUpdate. Use it to extract a fresh copy of the missing item(s) from the file archives on your OS X installation DVD. The file archives are in the /System/Installations/ folder (use Go to Folder option in the Go menu of the Finder.)
    Here are Four Basic ways to use Pacifist (courtesy of George Orville.)
    A. Drag a .pkg icon onto the Pacifist window .....proceed to step 7.
    B. Click on “Open Package ....” and navigate to package desired and click “Open” in the open/save window.....proceed to step 7.
    C. Insert Mac OS X installer CD and when it mounts, navigate to .... Menu->Go->Go to Folder.
    In the path field enter or paste ....
    /Volumes/disc name/System/Installation/Packages (where disc name is the name of the CD/DVD that you inserted.
    • Click on the "Go" button .....
    • Drag a .pkg to Pacifist..... proceed to step 7.
    The package you'll need will have to be discovered by trial and error, but for most applications you should start with the Essentials.pkg and/or Additional Essentials.pkg.
    D. Insert your Mac OS X install disk 1 .... and open Pacifist.
    1. In Pacifist, select "Open Mac OS X Install Packages" ... dialog may appear asking for disk 2, then disk 3 and finally disk 1 again.... {if DVD is not used)...If “Stop Loading” is selected...the procedure will stop!!!
    2a. When loading is complete, a new window appears, click the triangle to display contents of each package...Select item and proceed to step 7.
    2b. or click the “Find” icon in the Pacifist window and type the name of the software you need.
    3. In the list that comes back, click the top most entry for the item that you want. ..... that is the one for the English language.
    4. On the top of the Pacifist window, click “verify” .... you will probably be prompted for your password.
    5. Enter checks for.... “verify permissions” and “verify file contents.” and click “verify” ....enter password when prompted.... you will get back output which may look like this:
    20 files were scanned.
    20 of 20 files were present on the hard disk.
    0 of 20 files had file permissions that did not match those specified in the package.
    0 of 20 files had checksums that did not match those specified in the package.
    6. Click “close”. Go to step 7.
    Extract or Install........
    7. In the Toolbar (upper left), you now have the option to extract or install. Click a file in the lower list and those two icons will be enabled.
    8. If “Extract to...” is selected.... navigate to the location where the file will be placed, select “choose”, select “extract” in new dialog that appears,authenicate , if prompted, click “OK”.
    9. In the next dialog, click “Extract”.
    10. If “Install” is selected... dialog will appear with the location/path of the installed software. Click “Install”
    11. Type in your password, click “OK”
    • Pacifist will begin to extract files.
    12. In steps 8/10ß.... you also have the choice to “cancel”
    Notes.....
    • Pacifist may find that a file it is installing already exists on the hard disk. Pacifist will present you with an alert panel....
    Stop
    Leave original alone
    Update ..... Default selection
    Replace .... Replace option should only be used on full install packages

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. It was working fine now I cant get it to output to the Tv. Any ideas?

    My Macbook pro no longer outputs to my vizio led tv. It was working fine now I cant get any picture. It just says no signal. It is not the hdmi or the adapter because it works fine with my other tv. Any ideas on how to resolve this would be greatly appreciated. Please be as specific as possible. Thanks. BTW--I am using the mini dvi to hdmi adapter in case that was unclear.

    Since you say that the same connectors work on your other TV is suggests that the fault is not in the connectors but your Vizio TV.  I would check the settings on the Vizio TV.  Verify that is is set to receive HDMI input.  Perhaps you or some one else has inadvertently changed them.  Pressing the wrong buttons on a remote control device can do that.  (I am assuming no changes were made in SYSTEM PREFERENCES>DISPLAYS)
    Ciao.

Maybe you are looking for

  • G/l account is not appearing in purchase requisition

    Hi Folks, I have created PR via CRM FSO. The PR itself does not have the GL Account in the Account Assignment tab and so the PR does not show as a commitment in KO03 or KOB2.why the pr is not picking the g/l account. please help me out. Regards, Nara

  • Run NeroLinux 3.0 with lib32: possible?

    Hi guys, I've just installed Arch64 on my desktop computer (I have the 32 bit version on my Core Duo laptop). On the laptop I use NeroLinux 3.0 (beta) and I would like to use it even on my desktop. I tried the package in AUR and it works but the prog

  • Function module for Vendor

    Hi Pls help me out, Any function module , which takes Input as a Vendor ID and returns Vendor Name(Formatted Name). Regards Arya

  • Change of Domain Name

    My customer has changed their business name and domain name. I need to change Exchange Online Protection to send and received this new name.

  • Flash video / autohide question

    Hi, I'm building a website in Flash 8 which plays a number of videos. I have the choice of playing the videos using FLVPlayback components built into each video's .swf, or just creating a custom controller skin (the client wants a skin which resemble