Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2007, 03:00 PM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
Graphics
I am currently building a chessgame of player vs. player (no A.I.)
I am almost done with the logic (legel/illegal moves, etc..)
and I'd like to learn how to make a java applet/aplication,
I dont know the difference yet.
the Sun tutorials are packed with information all over the place, and beyond the basic tutorial it really spreads out to all directions, so its kind of hard to learn how to make an actual simple buttons, squares, lines applications there.

can anyone please guide me to focused tutorials on simple window building?
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-29-2007, 06:22 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
make an actual simple buttons, squares, lines applications there
In general terms you have two approaches:
1 — use components for your chess board, eg a GridLayout of JLabels or JPanels
2 — draw everything on a JPanel in the (overidden) paintComponent method.
Either way you can add your game to the center section of a BorderLayout in your JFrame or JApplet. For controls you have options: JMenus, JToolBar, or a JPanel with JButtons on it which can be added to the south section of the BorderLayout. The tutorial has a section on custom drawing/painting and also a trail on 2D Graphics if you like the drawing alternative. Sounds like you have found the rest of what you'll need there.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Classes in graphics CyberFrog New To Java 0 04-02-2008 11:11 PM
Graphics Joe2003 Advanced Java 1 01-25-2008 08:24 PM
graphics Joe2003 Advanced Java 4 01-18-2008 09:44 PM
Adding graphics to array romina Java 2D 1 08-01-2007 03:45 AM
Updating Graphics Greedful Java 2D 2 07-20-2007 09:12 PM


All times are GMT +3. The time now is 02:31 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org