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 7 of 7

Thread: Graphics in programs.

  1. #1
    Member
    Join Date
    Sep 2011
    Posts
    40
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Graphics in programs.

    Here is my question, I have some experience with writing regular programs in the command prompt, I know very little about swing, and understand how GUI´s work, but how will the code I have made, work in a GUI or something like that.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Graphics in programs.

    See the following for tutorials on how to use java Swing.
    Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)
    This should just be an extension of writing code for command line, much of the logic and data models will remain the same, just how it is presented to the user.

  3. #3
    Member
    Join Date
    Sep 2011
    Posts
    40
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: Graphics in programs.

    I know a little about swing, I have some books on it even, but will I be able to use the code I do now in GUI's?

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Graphics in programs.

    If the code is highly intertwined with the command line I/O, then it will take some work. If the code was written making use of classes, interfaces, and object oriented concepts (in other words written to be reusable), then it will be easier. Why not try and write a small command line application, then port it to a Swing GUI - this will give you an idea of what is involved, will be a learning experience, and open up the flow of ideas as to how you could design this small app regardless of the user interface.

  5. #5
    Member
    Join Date
    Sep 2011
    Posts
    40
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: Graphics in programs.

    A small command line application? Like a simple guessing game?

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Graphics in programs.

    Quote Originally Posted by tyb97 View Post
    A small command line application? Like a simple guessing game?
    Sure.

    By the way, that signature is still seriously distracting.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Member
    Join Date
    Sep 2011
    Posts
    40
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: Graphics in programs.

    Ok, I will change it.

Similar Threads

  1. programs of java
    By chinu in forum Java Servlet
    Replies: 2
    Last Post: July 26th, 2011, 12:08 PM
  2. Graphics class NullPointerException Initialize Graphics Class??
    By bglueck in forum What's Wrong With My Code?
    Replies: 7
    Last Post: May 13th, 2011, 11:13 PM
  3. Student Programs
    By Suzanne42 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 26th, 2011, 09:20 AM
  4. need help make a programs...
    By grendar in forum Loops & Control Statements
    Replies: 3
    Last Post: April 13th, 2011, 01:02 PM
  5. What programs shall i make?
    By DarrenReeder in forum Java Theory & Questions
    Replies: 1
    Last Post: December 27th, 2009, 08:31 AM