Results 1 to 2 of 2
Thread: Graphics
- 12-29-2007, 01:00 PM #1
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
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...
- 12-29-2007, 04:22 PM #2
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.
Similar Threads
-
Classes in graphics
By CyberFrog in forum New To JavaReplies: 0Last Post: 04-02-2008, 09:11 PM -
Graphics
By Joe2003 in forum Advanced JavaReplies: 1Last Post: 01-25-2008, 06:24 PM -
graphics
By Joe2003 in forum Advanced JavaReplies: 4Last Post: 01-18-2008, 07:44 PM -
Adding graphics to array
By romina in forum Java 2DReplies: 1Last Post: 08-01-2007, 01:45 AM -
Updating Graphics
By Greedful in forum Java 2DReplies: 2Last Post: 07-20-2007, 07:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks