I have a full screen Frame that won't display a List when I add it

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.net.Socket;
import java.net.InetAddress;
import java.util.Scanner;
public class Main {
    //the Main Frame to draw to
    static Framex f = new Framex();
    //login components
    static Panel top = new Panel();
    static JTextField username = new JTextField("ajtgarber", 20);
    static JPasswordField password = new JPasswordField("garber", 20);
    static JButton login = new JButton("Logon");
    static JButton quit = new JButton("Quit");
    static Label loginM = new Label("Please enter your username and password");
    static List CharList = new List();
    //networking components
    static Socket s =  null;
    static PrintStream stringOut = null;
    static Scanner stringIn = null;
    //main method
    public static void main(String[] args) {
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice gd = ge.getDefaultScreenDevice();
        f.setBackground(Color.BLACK);
        f.setUndecorated(true);
        f.setResizable(false);
        f.setLayout(new BorderLayout());
        top.add(username);
        top.add(password);
        top.add(login);
        top.add(quit);
        top.add(loginM);
        f.add(top, BorderLayout.NORTH);
        Image background = Toolkit.getDefaultToolkit().getImage("lakeview.jpg");
        //f.drawImage(background);
        gd.setFullScreenWindow(f);
        logon_setup();
        f.setSize(500,500);
        f.setVisible(true);
    //method for setting up actionlisteners for the login components
    public static void logon_setup() {
        quit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                shutdown();
                System.exit(0);
        login.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                attempt_login();
        password.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                attempt_login();
        //quit.setForeground(Color.WHITE);
        //login.setForeground(Color.WHITE);
        loginM.setForeground(Color.WHITE);
        CharList.setVisible(false);
    //attempts to login
    public static void attempt_login() {
        loginM.setText("Logging in Please Wait...");
        f.repaint();
        try {
            s = new Socket(InetAddress.getByName("127.0.0.1"), 2000);
            stringOut = new PrintStream(s.getOutputStream());
            stringIn = new Scanner(s.getInputStream());
            stringOut.println("Login||"+username.getText()+"||"+new String(password.getPassword()));
            String str = stringIn.nextLine();
            if(str.equals("Login 0x248")) {
                loginM.setText("");
                char_login();
            else if(str.equals("Invalid 0x248")) {
                loginM.setText("Invalid Username or Password!");
        } catch(IOException ex) {
            loginM.setText("Unable to Connect!");
        } catch(Exception ex) {
            ex.printStackTrace();
    //gives the user the character selection screen
    public static void char_login() {
        try {
            //username.setVisible(false);
            //password.setVisible(false);
            //quit.setVisible(false);
            //login.setVisible(false);
            loginM.setText("Getting Character List...");
            stringOut.println(username.getText()+"||charREQ"); //request character list
            ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
            CharList = (List) ois.readObject();
            System.out.println("Received CharList from Server");
            loginM.setText("");
            f.remove(top);
            f.add(CharList, BorderLayout.EAST);
            System.out.println("Char: "+CharList.getItem(0));
            f.repaint();
        } catch(Exception ex) {
            ex.printStackTrace();
    //method for ending the connection
    public static void shutdown() {
        try {
            s.close();
        } catch(Exception ex) {
class Framex extends Frame {
    private Image image = null;
    public Framex() {
       super();
    public void drawImage(Image i) {
       image = i;
       repaint();
    public void paint(Graphics g) {
        if(image != null) {
             g.drawImage(image, 0, 0, this);
}The Server and Client are a work in progress but Other than that why won't the List show up immediately after
I add it to the Frame?

Don't mix AWT and Swing widgets. Fix that, then ask again, preferably in the Swing section.

Similar Messages

  • How do I use dual displays to have a full screen app on one monitor and another full screen app or the desktop on the other?

    How do I use dual displays to have a full screen app on one monitor and another full screen app or the desktop on the other?
    I want to have my itunes visualizer on my TV which is connected via HDMI adapter, and still have access to full screen itunes and my desktop on the main display.
    Any suggestions?  App downloads that can do this?  Please let me know.

    You can't do it.  This has been an issue since Lion.

  • Help me! I have a new iPad mini that won't turn on. It was working fine this morning then i turn it off and it never turns back on. it doesnt register with iTunes and resetting isnt working either.

    Help me! I have a new iPad mini that won't turn on. It was working fine this morning then i turn it off and it never turns back on. it doesnt register with iTunes and resetting isnt working either. All I did is download instagram and snapchat and poof doesnt work. I have had these apps before!

    Make sure it's plugged into the charger.
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • I have a folder from today that won't let me change its name. I can change the other folders just fine. I do it routinely... any ideas what I screwed up?

    I'm as a loss. I don't understand why today's folder "2014-06-06" won't let me add "_Kim" to the end. I do it will all my folders since I download from a couple of cameras.

    sorry... in PS cc and I closed Photoshop, just in case.... it didn't make 
    any difference and it hasn't ever been an issue before.
    In a message dated 6/6/2014 7:03:57 P.M. Eastern Daylight Time, 
    [email protected] writes:
    I  have a folder from today that won't let me change its name. I can change
    the other folders just fine. I do it routinely... any ideas what I 
    screwed up?
    created by ssprengel (https://forums.adobe.com/people/ssprengel)  in 
    Photoshop Lightroom - View the full  discussion
    (https://forums.adobe.com/message/6440564#6440564)

  • I have songs on my computer that won't play because they need to be authorized. The e-mail that popped up is long forgotten. Help!

    I have songs on my computer that won't play because they need to be authorized. The e-mail that popped up is long forgotten. Help!

    You can contact iTunes Customer Support on this issue. I had the same problem once & they were able to fix the problem for me. Contact them at [email protected] They will get back to you ASAP.

  • I have iphoto11 but do not have the full screen icon at the bottom left hand corner of the screen. where is it?

    I am using  iphoto11 in OS lion but do not have the full screen icon at the bottom left hand corner of the screen. where is it?

    Shift - command - f  is the short cut to go to full screen - esc will return from Full screen to normal
    as far as to where the commands are - I am (and everyone her is) a user just like yourself - we can (sometimes) help with how to use iPhoto - we can not explain why Apple makes decisions nor can we make or affect any changes
    LN

  • I have a 5th gen that won't display any video out

    I have a 5th gen that won't display any video out. I've tried 2 different splitter cables out of the earphone jack. I've tried plugging the RCA cables into different colors on the tv. Thought it was just a problem with the cables until tonight when I got a Sonic Impact V55. Video won't display on it either. I have the TV setting to ask. After it asks and I say yes, I get a picture of an Ipod cable connector and a message saying: TV OUT
    ENABLED Please Connect Video Accessory.
    This message happens on both splitter cables and using the dock connection on the V55. I've restored, reset, nothing has helped.
    I did see a couple of posts regarding the V55 and whether the 5th gen would work on it. Does anyone have a v55 that the ipods working with? Heck the box says it works with Ipod 5th gen.

    Playercoca wrote:
    The video out on an iPod does not go trough the earphonesjack.
    It goes trough the place where you put youre dock conector in (on the bottom)
    Yes it does, on the 5th generation (pre-Classic) models, the video does indeed feed out the headphone jack (as well as out the dock connector on the bottom).
    Patrick

  • I have a two screen system that reads left to right.  With Yosemite it now reads right to left.  How do I fix it?

    I have a two screen system that read left to right.  With Yosemite the screens have switch and now the mouse and my brain have to read right to left.  Any ideas how to fix this?

    a brody,
    After further scrutiny your solution solved the mouse problem of going left to right.  But now the home screen problem.  Display two on the right still has the dock below and the menu bars.  Any ideas how to fix this?

  • Did a search, now have a full screen. No firefox symbol no toolbar. How do I get them back

    Had a toolbar but when I did search for badgehungry.com I must have hit something accidentally because I have a full screen & have no idea how to get toolbar etc. back. The articles didn't help, because I have no idea WHAT key they are talking about.
    I have windows 7 home premium & just added firefox yesterday

    TY for your help.
    Last nite I ran my Secunia program & had it reset my defaults.
    This morning my Firefox is back to normal. Did a couple of searches & everything is OK.
    Did not try F11 since OK but will try if have same problem again,

  • When I am using safari I do not have a full screen

    when I'm using safari I do not have a full screen, the top is blank

    This is what "full screen" Safari looks like. If you swipe up on the web page, the tool bar disappears. Pull down on the page to get the toolbar to show again. You are not seeing this?

  • Does anyone know why I don't have the full screen mode on my mainstage 2

    Does anyone know why I do not have the full screen mode on my mainstage 2??

    thanks very much!!!!

  • I have an I pod touch that won't let me download purchased apps and music on I cloud. Don't have problems with other apple products

    I have an I pod touch that won't let me download purchased music and apps using I cloud. It's driving me mad

    What happens when you try? Error message?
    Is the iPod associated with your account?
    iTunes Store: Associating a device or computer to your Apple ID

  • I have a few desktop icons that won't allow me to move them to trash or relocate them on desktop.  A PDF, a DOCX and a PART.  Not locked under get info or get info command doesn't work. Suggestions?

    I have a few desktop icons that won't allow me to move them to trash or relocate them on desktop.  A PDF, a DOCX and a PART.  Not locked under get info or get info command doesn't work. Suggestions?

    This any help?
    http://support.apple.com/kb/HT1526

  • Full screen Playback only on Main Display

    I noticed that after upgrading to Lion quicktime player won't play movies full screen on my second display.  Under Snow Leopard if the quicktime window was on the second display and you hit full screen it would fill the display is was on.  Now the video slides to the main display and then goes full screen.  There doesn't seem to be any way to change that behavior.  There are no preferences. 
    The only work around is to move the menu bar in the display preferences to the second menu, so that the second monitor becomes the main one. 
    Any solutions or terminal commands I make to set it back to the old way?

    This issue seems to be related to Lion's "Full Screen App" mode in Lion, where a window that goes to full screen creates a separate Space, and it always uses the "primary" screen (the one with Menu Bar).  So it's the same as making a Safari window go to full screen; it always uses the screen with the Menu Bar.
    But I did noticed something interesting.  If it's a video that can play in iTunes (instead of using QuickTime Player), then you can make it play full screen on the other screen.  Play the video in iTunes so that it plays in a separate window.  Move the window to the secondary screen (the one without Menu Bar), and make it go full screen.  It plays at full screen on that screen.
    So it is possible, but Apple has not done it for QuickTime Player.  You should send Apple feedback to request the same functionality for QuickTime Player, like I did.
    Also, VLC Player (third-party video player app) still uses the "old school" way of doing full screen mode, so it still works the same way as before.  Full screen will go to the screen that has the window playing the video.

  • I have a 7 minute MP3 that I want to edit, however when I drag it into garageband it only pulls in the first 3:30.  Any thoughts on why?

    I have a 7 minute MP3 that I want to edit, however when I drag it into garageband it only pulls in the first 3:30.  Any thoughts on why?  At the 3:30 mark in the song there is a pause but then it starts back up but for some reason the program won't pull in the part of the song beyond the pause.   Thanks!

    Hello npatel1207,
    You may need to increase the duration of the project.
    GarageBand '11: Set the project length
    http://support.apple.com/kb/PH1832
    Cheers,
    Allen

Maybe you are looking for

  • PROBLRM WITH MY CREATIVE MUVO NX HELP

    hi i have a little problem with my mp3. When it shold turn on , on display i see communicate "File system error" after that mp3's is turning off, what can I do. Please help me withe it. Thnx

  • Enhancements in SAP HR

    Can anyone please provide me the material for enhancements in SAP HR.

  • F11 Functionality is not working

    Hi, I am working on 11.5.10.2 version. In the Oracle Payables Invoice screen the F11 functionality is not working For other screens like supplier entry / payment batches..etc, the F11 functionality is working. When i enter the Invoice screen, i am pr

  • I get the flashing folder on booting my MacBook, but only if it is not connected to a power source.

    I have an early 2008 white MacBook, running Snow Leopard.  A few months ago the hard disk died, and I replaced it.  Now when I turn it on (or even wake it from sleep) I get the grey screen with the flashing folder/question mark.  However, when it is

  • Installing new drive in macbook

    hello all, i have a 2ghz macbook with a 60gb system drive that is pretty much at capacity. i've ordered a 120gb drive to replace it. only problem is that i don't know how to go about doing this switch. i mean, i know how to open up the laptop and phy