Results 1 to 4 of 4
  1. #1
    Derges is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Advice on graphics

    I'm fairly new to coding so apologies if this is in the wrong place but anyway.
    I've got a system (mostly) set up and need to get it to draw some simple diagrams (Lines and boxes) from data held in some Arrays.
    I could really do with some advice on what I aught to be using to do this and some advice on how to go about it would be appreciated as well.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    5

    Default

    it's easy. You can use swing api for it and private cause this use canvas.
    see java - How to make canvas with Swing? - Stack Overflow
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    Derges is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default

    Thanks for the quick response. I've had a look through the tutorials you linked and tried them out successfully.
    I can get it to draw a box where I want using the drawRect() method but only when I give it the 4 values, not from my arrays. Any tips on how to feed it the data?

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    The "DrawOnComponent" example from Custom Painting Approaches « Java Tips Weblog shows you how to loop through an ArrayList to paint rectangles.

Similar Threads

  1. got any advice?
    By cejay in forum Networking
    Replies: 2
    Last Post: 03-17-2011, 11:33 AM
  2. looking for OO advice
    By intrepid604 in forum New To Java
    Replies: 7
    Last Post: 02-16-2011, 06:01 PM
  3. need for some advice
    By kasiopi in forum AWT / Swing
    Replies: 3
    Last Post: 01-26-2011, 01:36 PM
  4. Drawing a graphics onto another Graphics ?
    By Ziden in forum Java Applets
    Replies: 0
    Last Post: 01-08-2011, 08:30 PM
  5. Im new n looking for an advice
    By azlynn in forum New To Java
    Replies: 2
    Last Post: 12-10-2009, 03:47 AM

Posting Permissions

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