Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Java based games..

  1. #1
    Member
    Join Date
    Dec 2011
    Posts
    34
    My Mood
    Cheerful
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Java based games..

    I've been thinking about just writing a basic game, but I don't know how to. I want to start out with a tic tac toe game. Which will display the images and the checkmarks.. I think it will be rather hard.. If anybody has a suggestion of any other game than tic tac toe for me to learn that will be easy, please post them. How would I create a game like tic tac toe that requires mouse movement and clicks.

    Never mind.

    After reading a few tutorials, I've found out how to do the above. Now what I seek is how to set a text area in a specified spot?
    Last edited by imsuperman05; January 11th, 2012 at 09:05 PM.


  2. #2
    Member snowguy13's Avatar
    Join Date
    Nov 2011
    Location
    In Hyrule enjoying a chat with Demise and Ganondorf
    Posts
    339
    My Mood
    Happy
    Thanks
    31
    Thanked 48 Times in 42 Posts

    Default Re: Java based games..

    Have you worked with Swing and AWT components at all? Before you can add a JTextArea, you should probably have a JPanel, and before that, you need a top level container.

    The links I used there link you to tutorials; if you want the class documentation, see here:
    JTextArea
    JPanel
    Container

    The general idea is that you add the JTextArea to a JPanel, and then add the JPanel to a top level Container, such as a JFrame or JDialog. All of those objects have a plethora of methods and fields to aid you in laying out and displaying your program.

    Also, note that questions about Swing and AWT components as well as GUI's should be asked here.
    Last edited by snowguy13; January 12th, 2012 at 04:12 PM.
    Use highlight tags to help others help you!

    [highlight=Java]Your prettily formatted code goes here[/highlight]

    Using these tags makes your code formatted, and helps everyone answer your questions more easily!




    Wanna hear something funny?

    Me too.

Similar Threads

  1. Replies: 3
    Last Post: September 8th, 2011, 04:42 AM
  2. PeerSim P2P simulation based on JAVA
    By aditya149149 in forum Threads
    Replies: 0
    Last Post: August 24th, 2011, 04:26 PM
  3. Java Based lightweight Table (grid)
    By vairam in forum Member Introductions
    Replies: 5
    Last Post: April 11th, 2011, 06:13 AM
  4. 2D Java Applet Games
    By bbr201 in forum Java Theory & Questions
    Replies: 26
    Last Post: August 27th, 2010, 09:12 AM
  5. How to make java based animation?
    By JavaPF in forum The Cafe
    Replies: 1
    Last Post: June 7th, 2008, 06:55 AM