My JFrame is all white!?!?!

I've made a JFrame and added some buttons, but for some reason it's all white? What's wrong?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class GUI extends JFrame {
     private JButton add = new JButton("add");     
     private JButton remove = new JButton("remove");
     private JButton reset = new JButton("reset");
     private JTextArea choiceArea = new JTextArea(4,4);
     public GUI() {
          super("Generator, v1");
          Container pane = getContentPane();
          JPanel buttons = new JPanel();
          buttons.setLayout(new GridLayout(3,1));
          buttons.add(add);
          buttons.add(remove);
          buttons.add(reset);
          pane.add(buttons);
          pane.add(choiceArea);
          setSize(500,500);
          setVisible(true);          
}

Add the buttons to north and textarea to center. If you don't specify where to put the panels, they are by default placed in center (I think...), and because you placed the textarea there after you had placed the buttons, the buttons will be replaced by the textarea.
this is how your code should look like:
    pane.add(buttons, BorderLayout.NORTH);
    pane.add(choiceArea, BorderLayout.CENTER);instead of
    pane.add(buttons);
    pane.add(choiceArea);

Similar Messages

  • Pages Document displays all white in preview

    I took an old flyer that I had on my iPad and brought it over to my MacBook Pro.  After I finished the modifications I tried to put it back on my iPad.  It kept hanging on the import so I decided to just save it as a PDF and manually place it on the iPad.  However, when I save as a PDF all that displays is a white page, if I try to print the preview screen is all white as well. 
    Any help would be appreciated, I need to get this flyer ready by Monday.
    Thanks
    PB

    There was one (maybe two) plain yellow object like this one. I build this one in a hurry with Gimp but in the doc it was a vectorial object.
    and if I remember well, after removing it (or them) the doc behaved well.
    If I may get the doc with is treated in this thread, I would try to identify it in the index.xml file.
    Maybe I would understand what's wrong with it.
    Yvan KOENIG (VALLAURIS, France) dimanche 5 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from

    I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from it.  It has worked in the past but I downloaded the update today and photomerge will not work correctly.  Any ideas?

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • My MacBookPro (mid 2012) will not complete the boot process. Yosemite's progress widget gets about 1/3 to 1/2 way across when the logo disappears and the screen goes all white for 10-15 secs or so, then the machine shuts down and restarts.

    My MacBookPro (mid 2012) will not complete the boot process. Yosemite's progress widget gets about 1/3 to 1/2 way across when the logo disappears and the screen goes all white for 10-15 secs, then the machine shuts down and restarts. This sequence will repeat seemingly forever unless I shut it down manually.
    I upgraded to Yosemite from Mountain Lion a couple months ago, skipping Maverick completely, and I've done any associated updates that Apple told me about. I don't recall which version of Yosemite I have, but I'm sure it is the "latest and greatest".
    I've tried re-starting in Safe Mode / Safe Boot and that does the same thing as described above except without the endless restarts. Instead of restarting at some point, SafeBoot proceeds to the white screen and then it hangs until I restart it manually. (I've waited as long os 20-30 minutes with no response).
    When I tried the option-command-p-r key combo I never get any chimes or other noises besides the original 1 time boot sound that you would expect to get when starting up a macbook pro.
    I was using the mac quite normally (meaning I was doing work I normally do on it and there was no indication of anything wrong) immediately prior to this happening.
    The machine is BootCamp(ed) with Windows 8.1 which I use from a VMWare virtual machine instead of natively so that I can have both OSes running at the same time. I also think this is unrelated to my problem. I have been using this setup for more than 2 years.
    My upgrade to Yosemite was uneventful and I thought it went well and was very smooth. I don't want to lead attention away from Yosemite, but at this point my problem does not seem related to the upgrade.
    Any help is appreciated.

    Install or Reinstall OS X from Scratch
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Erase the hard drive:
      1. Select Disk Utility from the main menu and click on the Continue button.
      2. After DU loads select your startup volume (usually Macintosh HD) from the
          left side list. Click on the Erase tab in the DU main window.
      3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on
          the Security button and set the Zero Data option to one-pass. Click on
          the Erase button and wait until the process has completed.
      4. Quit DU and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Install button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
               because it is three times faster than wireless.

  • Flash animation preview is all white

    I'm using Flash CC on a windows computer. My document is an HTML5 canvas. I have my animation all finished, with the exception of the Actions for the button. I have tested the animation before adding any Actions and it shows up in the browser fine (I used both Chrome and IE). But when I add in the Actions for the button to go to another web page and test it out, the animation turns all white. I used the code snippet "Click to go to Web Page", while the button is selected.
    I have looked at many different sites and books and it looks like I'm doing everything right. But my test just shows a white box.
    In the output  is says the following:
    WARNINGS:
    Text support is limited. It is generally recommended to include text as HTML elements (see DOMElement). (6)
    Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (2)
    Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.
    Motion tweens are published as frame by frame animations. Use classic tweens where possible. (15)

    I figured it out!!!! I was using the code snippet from the ActionScript Folder, not the HTML5 folder. When I switched it it works fine!!!

  • My iPad screen went all white when I was trying to close an app. I cant turn it off and iTune cant sync with it either.  Does anyone know what I should do to fix this.

    I have an iPad 2 that is about 2 years old and is in good shape. I was trying to swipe off an app when the screen went all white. I held down the power button to shut it down but it wont do any thing but go black. When I press the power button it come back all white with no icons and no passcode pad. Does anyone know how to fix this or what it is?
    Thanks

    TThanks for the suggestion but it turns out that you have to hold down the Home button, the Power button AND the Volume UP button at the same time for several seconds until,the Apple appears To fix the white screen of death. Found that on another help site. It works and boy an I glad. Pass it on.

  • Imported Photos Go All White! A Bug Or Is It Quartz/Core Issue?

    Imported Photos Go All White! A Bug Or Is It Quartz/Core Issue? Tried jpg and png and .........

    I had that same problem with my laptop. Went to apple and they could not fix it. Had another issue and they told me to copy my iphoto library to the desktop. When I did that the white pictures were then visible on the desktop library. They said I had too much stuff on my computer. When I upgraded to I life 06 most of the pictures came back.

  • Mail & iChat gone all white & dead

    Something really strange just happened: The Mail Appl. window went all white, I just see the folders on the left, but all mails are invisible. I checked the option "show mailboxes" under View, but that one was activated. The folders ell me that mails are in fact arriving, it's just that I can't see them.
    To complete the fun, iChat stopped working as well.
    Thee must be something broken "under the hood" but I'm not much of a mac-hanic. Are you? Thanks !
    iMac 20 Intel   Mac OS X (10.4.9)  
    iMac 20 Intel   Mac OS X (10.4.9)  

    Normally, in the mail application window, the left column shows the folders, mailboxes etc. The major part of the window shows the mails themselves and that is what I don't see at all no more. It's all just white. No Mail to see. When I use my iBook all is fine. So it's not the account thats wrong.
    I guess the mistake is somewhere deeper hidden in the OS because iChat doesn't work either.

  • HT4623 iOS7 downloaded and now my screen is all white

    I downloaded iOS7 and now all of a sudden my screen is all white, nothing happened to the phone during installation it literally sat right next to me the whole time. What do I do? My lock button is broken so I can't reset it.

    Hey aCasey,
    Thanks for the question. If you have not done so already, it may be appropriate to restore your iPhone with iTunes and reinstall iOS 7. If you have trouble, you can do so in recovery mode:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • My screen is all white

    anybody know wy my screen is all white ?

    Shutdown by holding the on/off button for 10 seconds and then restart and see if it persists.

  • HT4623 I tried to update and now my screen is either all white or blue, I get nothing else

    I tried to update  and now my screen is either all white or blue and i get nothing

    Try:
    - iOS: Not responding or does not turn on
    - If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • So randomly my ipod crashed and when i turned the ipod on again it was all white and blurred. Part of the screen is up to speed but the other half is slow. Already tried turning it completely off and restoring it on the computer

    So randomly my ipod crashed and when i turned the ipod on again it was all white and blurred. Part of the screen is up to speed but the other half is slow. Already tried turning it completely off and restoring it on the computer

    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.  Also, if you have IOS-7, read this.

  • Why does my MacBook Air power on to an all white screen, and after a minute will flash a folder icon with a question mark on it?

    My computer powers on to an all white screen, after it locked up. How can I reboot?

    You will need to reinstall OS X.

  • Create iPod or iPhone version generates all white, audio only video

    I have been trying to find any explanation for this by searching here and on Google, with little success.
    I am trying to export my movies to my ipod with no success.
    I will explain what I do:
    I pick a movie from the iTunes Library (it plays just fine), then I go to Advance and click "Create iPod or iPhone Version". iTunes goes through the Conversion process, and after a few minutes (depending on the size of the original movie), I get the converted version, right next to the original one.
    This version will be the same length, audio is just fine, but the video is all white (at this point, the video would transfer to my iPod Touch, were I would get the same all white video).
    This happens with MP4 files. I followed the steps on Apple Support on how to verify the conversion of files (they provide a MOV file), and that worked fine. I do not have more MOV files to test.
    Other troubleshooting steps included:
    - Trying with different MP4 files as source
    - Trying on different computers (two WinXP PCs with the latest iTunes installed)
    - Removing and reinstalling iTunes and Quicktime
    Any feedback is highly appreciated. However, I do not wish to use a 3rd party tool to do this (so recommending Handbrake or others is not that much helpful).
    Thank you!

    I can confirm that converting from MOV works, whilst MP4 does not. Unfortunately, unless you use a 3rd party tool to convert from whatever format they're currently in to an MOV file, there's not much you can do until Apple fixes this problem! :C

  • Why is my ipod 4th generation have an all white screen or an all black screen?

    my ipod is on but it only has an all white screen or black screen. I'm crying over it becuase i have everything on my ipod.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

Maybe you are looking for