Textarea and buttons not displaying

I've been playing around with the code for awhile. I feel like I'm overlooking something really simple here. But I can't get the app to display the text-box or buttons. Makes it kinda hard to do unit testing. Any advice on oppurtunites would be greatly appreciated!
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
public class FirstName extends JFrame implements ActionListener {
     private String names[] =
               "Joe",
               "Mark",
               "David",
               "Bryan",
               "Amber",
               "Abigail",
               "Skyler",
               "Melanie" };
     private JButton jButton;
     private JTextArea jTextArea;
     private JPanel jPanel;
     private JTextField jTextField;
     private JLabel label;
     public FirstName() {
          initComponents();
          List link = new LinkedList(Arrays.asList(names));
          setSize(400, 200);
          show();
     private void initComponents() {
          jPanel = new JPanel();
          label = new JLabel();
          jTextField = new JTextField();
          jButton = new JButton();
          jTextArea = new JTextArea();
          label.setText("Enter a Name to Search:");
          jPanel.add(label);
          jTextField.setColumns(20);
          jPanel.add(jTextField);
          jButton = new JButton(" OK ");
          jButton.addActionListener(this);
     public void actionPerformed(ActionEvent e) {
          boolean found = true;
          String entered = jTextField.getText();
          if (found) {
               jTextArea.setText("found");
          } else {
               jTextArea.setText("not found");
          jPanel.add(jButton);
          jTextArea.setColumns(30);
          jTextArea.setRows(5);
          jPanel.add(jTextArea);
          getContentPane().add(jPanel, BorderLayout.CENTER);
public static void main(String args[]) {
          FirstName application = new FirstName();
          application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

You've forgotten to add the panel to the frame, eg, at the end of initComponents().
Have a read of the Swing section in Sun's Tutorial to see an example of the "approved" way of creating and showing the frame. A typical example using invokeLater() is here: [HelloWorldSwing.java|http://java.sun.com/docs/books/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start//HelloWorldSwing.java]. Notice, too, that it uses setVisible(true) rather than the deprecated show().
(When you post code, use the {code} tags. The idea is that you put {code} at the start of your code and the same thing again at the end. That way your code will be properly formatted and syntax coloured when it appears here.)

Similar Messages

  • Upgrading APEX from 3.2 to 4.0 images and buttons not displaying correctly

    Database 11.2.0.1
    APEX: 3.2.1
    Attemping to upgrade APEX from 3.2 to 4.0. The installation script runs fine and updates the database successfully. I run the .sql to import the images and it ran successfully however when I attempt to access the APEX home page, the images are not loaded and the buttons don't do anything. I did some research through google but did not come to anything that resolved my issue. Does anyone have any ideas?
    Thanks for your time...

    If you are using mod_plsql, you need to run @apxldimg.sql script with SYS user file present with Apex installation. Also provide the location of your apex folder as parameter to this script.
    Habib

  • Link Button Not Display for Tax Amount

    Hi Experts,
    I have one Problem
    I am creating A/R Invoice Document and I have assing Tax Code for Item
    It will show Tax Amount but link button or drill button not display for tax amount
    pls give me solution
    Warm Regards,
    Sandip Kokate

    HI
    How to Clear Chumb
    And I am Selecting Tax Code but still it will not show Tax Amount Link button but Tax Amount is perfectly Match
    Regards,
    Sandip kokate

  • Any fix for TM buttons not displaying glitch?

    I see others are having problems with the Time Machine buttons not displaying properly. But I didn't see any fix yet. On my MacBook, the problem only occurs with an external display.
    Hope this gets fixed soon.

    It looks that you have made changes to the appearance of button that cause items and text to be larger.
    In your case this doesn't seem to work properly with the consequence that the middle part of the button gets distorted.
    I'm curious if this artifact would move to the other (Cancel) button or disappear if you would use the Tab key or cursor key to set focus to the Cancel button or if it is a problem with the label text that isn't default (OK or similar).

  • Iconic buttons not display icons

    Hello All,
    i have problem with the iconic buttons not display icons in forms 10g
    i have set button properties as
    iconic=yes
    icon filename=print
    my path for icons and forms are
    e:\backoffice
    plz any solution
    thx
    najeeb ur rehman

    Hi,
    Read the doc at :
    http://www.oracle.com/technology/ products/forms/pdf/webicons.pdf
    It's very descriptive and It'll help you...
    Regards ,
    Simon

  • ESS benefits and payment not displaying after support pack update

    Hi All,
    After the latest HR support pack update ESS benefits and payment not displaying
    SAP ECC 604 EPH5
    SAP_ABA 702
    SAP Kernel :  720_EXT_REL
    Kernel Patch number : 439
    Netweaver portal version - 7.30
    please help
    Regards
    Rahul

    Hi Siddharth & Jwala,
    the issue got fixed, by changing the order of Payment above the Benefits
    1. i made some options to be disabled & enabled in both benefits and payment
    2. Then in the portal i could see the benefits and payment
    3. inside the benefits & payment i was able to see two option 1 is for benefits & other is for payment
    4. we only wanted payment functionality to be displaying
    5. so i tried to hide the benefits then noting was getting displayed in the portal
    6. finally i changed the order of the payment just above the benefits
    then then i was able to see the benefits and payment inside that i was able to see the payment where i was able to see the payslip
    i am not sure what i have done but i is working but please let me know what the problem was actually
    Regards
    Rahul

  • Webhelp TOC and Contents not displayed in Google Chrome

    Hello All,
    I recently tried to view webhelp (generated using Robohelp 7.0) in Google chrome. But chrome displays only the first topic of the web help and does not display the TOC of the help. Can any one please help me in why this is happening.
    PS: I am viewing the online help from a server and not from local folder. When viewed from within local folder it doesn't display any info.
    Rithesh

    Hi,
    See snippet 103 and snippet 130 on Peter's site: http://www.grainge.org/pages/snippets/snippets.htm
    Greet,
    Willam

  • JPG files copied to Philips Picopix 3410 are currupted with a prefix of ._ and will not display on the PicoPix

    JPG files copied to Philips Picopix 3410 are currupted with a prefix of ._ and will not display on the PicoPix. Help please?

    There are a couple of ways to remove these items from the drive.
    One is with the $15 shareware app, BlueHarvest. It will remove the AppleDouble files from the drives you want the ._ files removed from, and has an option to prevent them from being written to non Apple formatted drives in the first place.
    But the free and pretty easy way to do it is to use Terminal. From what I can see in the manual for your projector, you can only get images to it on either an SD card or a USB flash drive. So I'm going to assume a USB drive for the following.
    Plug in your MS-DOS formatted drive so it appears on the Mac desktop. Open Terminal and enter:
    dot_clean -m
    Enter a space after the -m . Then drag and drop the icon of your flash drive into the Terminal window. It will fill in the path of the drive. Press Enter. All ._ files will be removed from that volume.
    Actually, I think it removes all files that start with a period. None of which are of any great importance on a DOS formatted drive. Such as the hidden trash for that drive. The next time you plug the drive in, OS X will simply recreate it.

  • TS2771 on i pod touch the orientation does not change when I turn it on it's side when using safari etc.  When viewing youtube it only displays widescreen and will not display portrait , anyone any ideas? is this a fault or do all ipod touch do this?

    On i pod touch the orientation does not change when I turn it on it's side when using safari etc.  When viewing youtube it only displays widescreen and will not display portrait , anyone any ideas? is this a fault or do all ipod touch do this?

    The user guide says:
    Movies viewed in Videos and YouTube appear only in landscape orientation. Street views in Maps
    also appear only in landscape orientation.
    Do you have the scree orientation lock turned on? If on there is a circular arrow icon with a padlock inside next to the battery charge icon in the upper right.

  • RSS, Back and Slideshow buttons not displaying correctly

    I just finished my new wesite in Iweb and published it to .mac. Everything is working fine in Iweb but when I look at the published site the RSS, Subscribe, Back buttons are displaying really screwy. There are added buttons where I didn't put them. How can I fix this? It is occurring specifically on my photo album pages.
    Janer

    Publish your site to and folder on the desktop and double click the index.html file to launch your site in the browser.
    If the page looks OK do a "Publish all to Mac".
    If its still not right you'll have to go back to the iWeb page and try resetting the buttons and then do a Publish All.

  • User account control message displays every time, minimise and close buttons not displaying, pages slow to load

    Every time I try to open a page, I get a user account control message asking for permission to proceed. I have tried to adjust the frequency of this but have been unsuccessful. This has only started to occur recently.
    Pages are slow to load and do not properly display the close, minimise etc buttons in the top right corner (these are blacked out)
    I have tried to reset firefox. This does not fix the problem.
    The problem does not occur using Internet Explorer

    There are several things to try.
    Some problems occurs when your Internet security program was set to trust the
    previous version of Firefox, but no longer recognizes your updated version as
    trusted. Now how to fix the problem: To allow Firefox to connect to the Internet
    again;
    * Make sure your Internet security software is up-to-date (i.e. you are running the latest version)
    * Remove Firefox from your program's list of trusted or recognized programs, then add it back. For detailed instructions, see
    '''[https://support.mozilla.org/en-US/kb/configure-firewalls-so-firefox-can-access-internet?esab=a&s=Configure+firewalls+&r=0&as=s Configure firewalls so that Firefox can access the Internet.]''' {web link}

  • CRM BP type Sold-to-party Sales Area Data button not displayed

    Hi Gurus,
    Currently we are in the system preparation stage, but there's a problem in BP maintenance. For the BP type Sold to Party, the sales area data button is not showing up in the button bar with the General data. I only can see General data and Relationships here.
    The sales area has been maintained in the system already and can be displayed in the reference bp. Not sure any config will affect.
    Appreciate if anyone can give me a clue.
    Rgs, Michelle

    Hi,
    If you have chosen the role, and the button is not coming up following could be the possibilities:
    1. It might sound funny but it is a possibility that You might ALREADY be in the Sales Area data screens. Check if the "General Data" button is active. if it IS active then you ARE in the Sales area data.
    2. If not 1, above, then check the authorisation for the id to create BP for Sold to party and / or Sales area.
    3. Still No, then check if the screen config for creating BP is std or its a customised one wherein maybe the button has been rendered inactive. You can check by taking an existing BP who might already be a sold to part for a sales area. If this is your first case for a Sold to party then you might look at the screen config for sure.
    Do write back if you still need help.
    Regards,
    Tariq

  • How to fix the firefox buttons not displaying correctly (i.e. the "save file" button when trying to install an add on)?

    For example, the button for "save file" when downloading an add-on does not display correctly. It works nevertheless, but the button itself is not showing up correctly.
    *edit: sp errors*

    It looks that you have made changes to the appearance of button that cause items and text to be larger.
    In your case this doesn't seem to work properly with the consequence that the middle part of the button gets distorted.
    I'm curious if this artifact would move to the other (Cancel) button or disappear if you would use the Tab key or cursor key to set focus to the Cancel button or if it is a problem with the label text that isn't default (OK or similar).

  • Button not Displaying in JRE 1.4.2

    We have one Applet with Image button and it used to work fine with JRE 1.4.1. If I install JRE 1.4.2 in my Machine Image Buttons are not displaying.
    We coded as follows
    public class ImageButton extends JButton {
    private Image image = null ;
    private ActionListener listener = null ;
    public ImageButton( Image image ) {
    super(new ImageIcon ( image ));
    this.image = image ;
    setCursor(new Cursor ( Cursor.HAND_CURSOR ) ) ;
    setBorderPainted ( false ) ;
    setOpaque(false) ;
    setBorder(null);
    setMargin(new Insets ( 0, 0, 0, 0 ) ) ;
    public class StartPanel extends OutputPanel implements ActionListener {
    private ImageButton pb_START = new ImageButton ( AppletUtil.loadImage ( "start.gif" ) ) ;
    private RadarApplet applet = null ;
    /** A panel to hold buttons */
    private JPanel pnl_BUTTONS = new JPanel () ;
    * Constructor for StartPanel.
    public StartPanel( RadarApplet applet ) {
    super();
    this.applet = applet ;
    setBackground ( Color.white ) ;
    pnl_BUTTONS.setLayout ( new FlowLayout( FlowLayout.CENTER, 3, 0 ) ) ;
    pnl_BUTTONS.setBackground ( Color.white ) ;
    pnl_BUTTONS.add ( pb_START ) ;
    add ( pnl_BUTTONS ) ;
    pb_START.addActionListener ( this ) ;
    showProgress(false) ;
    setLowerComponent ( pnl_BUTTONS ) ;
    setText( RadarConfiguration.getString( "ready_to_download" ) ) ;
    setDescription( RadarConfiguration.getString( "ready_to_download_desc" ) ) ;
    * @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
    public void actionPerformed(ActionEvent e) {
    ( e.getSource() == pb_START )
    new Thread ( new Runnable () {
    public void run () {
    applet.startProcess() ;
    } ).start() ;
    }

    One thing to add for clarification, the problem I described is the application display problem and NOT the screen capture problem.
    Yu-Ten Lee

  • PayPal donation button not displaying correctly in FireFox

    I added a PayPal donation button, but it only displays correctly in Explorer - not in FireFox.  The site is:  www.washoe.k12.nv.us/mtrose
    <div id="content"><!-- InstanceBeginEditable name="content" -->
            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_donations">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Mount Rose Elementary School">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
    <input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
            <h1>Two-Way Immersion</h1>
            <p>The goal of our program is to help young s tudents become fluent in Engish and Spanish by the end of <br>
            elementary school.        </p>
            <p>Our program began in 2008-2009 with one kindergarten class and will expand one grade each year as the students move through the grades for a total of seven classes.</p>
            <p>The program is voluntary and there is a waiting list.</p>
            <p>The initiation of the program is designed to serve the students already zoned for our school and does not involve busing students or change Mount Rose's current zoning.</p>
            <p>The program also does not involve the addition of portables to our school at this time.</p>
            <h2>Mount Rose Centennial Celebration!</h2>
            <p><a href="Mount_Rose_Centennial.pdf">Mt. Rose Centennial Celebration</a> - An Old Time Picnic and Reunion of Mt. Rose Elementary School Friends Past and Present. Join us on October 2, 2011 from Noon to 4 PM for A Celebration to Commemorate the Centennial of Mt. Rose Elementary School One Hundred Years of Educating Reno's Downtown and Old Southwest Neighborhood Young!</p>
            <p>Commemorative T-shirts avialable $8 / For more information click <a href="centenial.pdf" target="_blank">HERE.</a></p>
            <p>For more information contact Jenny Brekhus 544-1694 or [email protected]</p>
            <p><img src="images/tshirt.jpg" width="403" height="253" alt="tshirt photo"></p>
            <h2> </h2>
        <!-- InstanceEndEditable --></div>
        <div id="rightside" class="brd-thin-white-top"><!-- InstanceBeginEditable name="right-top" -->
            <h2>Early Release Days!</h2>
            <p> Every Wednesday during the 2010-2011 school year, school will be released at 2:30 for teacher professional learning communities. This is a district wide change and will replace most early release days.</p>
            <p>Please remember to make arrangements for you child on Wednesdays!</p>
        <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="right-bottom" -->
            <h2><a href="https://campus.washoe.k12.nv.us/campus/portal/washoe.jsp"><img src="images/infinite_campus.jpg" width="142" height="102" alt="infinite campus portal"></a></h2>
            <p><a href="http://www.washoe.k12.nv.us/district/departments/transportation/bus-rules"><img src="images/bus_rules.gif" width="120" height="90" alt="bus rules"></a></p>
            <p><a href="http://www.washoe.k12.nv.us/district/departments/transportation/elink"><img src="images/bus_schedules.gif" width="202" height="87" alt="bus schedules"></a></p>
            <p><a href="http://www.washoe.k12.nv.us/espanol"><img src="images/spanish.gif" width="200" height="70" alt="wcsd spanish site"></a></p>
            <p><img src="images/wcsd.jpg" width="99" height="143" alt="wcsd logo"></p>
            <!-- InstanceEndEditable --></div>
        <div id="footer" class="brd-thin-white-top">
            <p class="footer-text">&copy; 2010 |<a href="mailto:[email protected]" target="_blank">Webmaster</a></p>
        </div>
    </div>
    </body>
    <!-- InstanceEnd --></html>

    Appears OK in Firefox... is it not where you want it?

Maybe you are looking for

  • TS3988 Can 2 people use the same icloud?

    Need help badly, such a mess! My son is under my Itunes acct-I have an Iphone 4s, he has an Iphone 4. Somehow his phone is on the ICloud with our Apple ID (which is my gmail address) & pw. He also has an @me.com-set up by me trying to seperate our ph

  • Mail not starting?? Need HELP PLEASE

    Hi, Everything has been working fine for the last few days until this evening when Mail just will not launch. If I go to Force Quit I see it stating that Mail is not responding. Please can someone tell me what I need to do to get the mail working aga

  • Adding a progress loader to a dynamic text field / scrollPane

    I have a dynamic text field which is loading images from an external html.  This text is named scrollPaneImage and is a child of a movieClip called scrollPaneContent.  I then load scrollPaneContent into a scroll pane named scrollPane When the user in

  • ORA-03121 Error

    To all: Hi! Anybody who is familiar with this error? "[Intersolv][ODBC Oracle Driver][Oracle]Error while trying to retrieve text for for error ORA-03121". I am using Oracle version 7.3 and Intersolv 16-bit ODBS Driver. If you have any idea about this

  • [Solved]Yaourt sync issue

    I installed yaourt according to the instruction here http://archlinux.fr/yaourt-en But when I run yaourt -Syu --devel --aur , I get an error: problem setting dbpath '//usr/local/var/lib/pacman/' (could not find or read directory) The directory doesn'