Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > need simple hel...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 15987 of 16070
Post > Topic >>

need simple help.....

by TheBigPJ <TheBigPJ@[EMAIL PROTECTED] > Apr 17, 2008 at 10:03 AM

Im confused why this isnt working....

Any ideas? What have I stupidly missed?

Thanks,
Peter

-----------------------------
import javax.swing.*;
import java.awt.*;
import java.util.*;

public class CAS2_Interface extends JPanel{

    CAS_Engine theCAS_Engine;

    public static void main(String[] args)
    {
        JFrame mainWindow = new JFrame("CASAT - Connect a Square on a
Tesseract (Multiplayer)");

        JPanel content = new JPanel();
        content.add(new CAS2_Interface(), BorderLayout.WEST);

        mainWindow.setContentPane(content);

        mainWindow.getContentPane().setBackground(new
Color(176,196,222));
        mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mainWindow.setLocationRelativeTo(null);
        mainWindow.pack();
        mainWindow.setVisible(true);
    }

    public void CAS2_Interface()
    {
        setPreferredSize(new Dimension(600,471));
        setBackground(new Color(173,216,230));
    }

    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        drawScreen((Graphics2D) g);
    }

    public void drawScreen(Graphics2D g)
    {
        //Uses the game board as defined in the program specification
        Image image = Toolkit.getDefaultToolkit().getImage("./
map.png");
        g.drawImage(image, 0,0,this);
    }
}




 4 Posts in Topic:
need simple help.....
TheBigPJ <TheBigPJ@[EM  2008-04-17 10:03:49 
Re: need simple help.....
RedGrittyBrick <RedGri  2008-04-18 11:11:19 
Re: need simple help.....
Knute Johnson <nospam@  2008-04-18 08:37:41 
Re: need simple help.....
TheBigPJ <TheBigPJ@[EM  2008-04-18 16:09:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 2:10:43 CDT 2008.