Results 1 to 2 of 2
  1. #1
    arifin is offline Member
    Join Date
    Nov 2010
    Rep Power

    Default Drawing simple graphics in NetBeans

    I am trying to draw some simple graphics in NetBeans (6.9.1).
    Say, I have a jFrame, and a jPanel inside the jFrame... the usual code as generated by a simple NetBeans project.
    Now, I need to 'draw' some rectangles side-by-side (much like a checker or chess board) in jFrame.
    The total number of rectangles should be modifiable (e.g. in separate textbox.. I have this in the code). Of course, when the user changes this number, the grid should update and show the correct number of rectangles in the grid.

    Anyone could link to any simple tutorial or example please? Do I need to use AWT? How does Swing draw graphics?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    There's a NetBeans section of these forums. This one's for AWT/Swing.

    Do I need to use AWT?
    Swing is built on AWT.

    How does Swing draw graphics?
    Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)
    Trail: 2D Graphics (The Java™ Tutorials)


Similar Threads

  1. Simple Graphics
    By Freakzoyd in forum New To Java
    Replies: 6
    Last Post: 10-05-2010, 03:47 AM
  2. Simple drawing on a JPanel
    By Catfish1 in forum New To Java
    Replies: 2
    Last Post: 10-04-2010, 04:59 PM
  3. Drawing graphics primitives
    By diegofsza in forum Java 2D
    Replies: 7
    Last Post: 09-25-2009, 12:10 AM
  4. New simple application using a simple database
    By webbusiness23 in forum New To Java
    Replies: 9
    Last Post: 08-03-2009, 03:55 AM
  5. drawing char by char with Graphics
    By diggitydoggz in forum New To Java
    Replies: 5
    Last Post: 12-27-2008, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts