Search:

Type: Posts; User: brigadier90

Search: Search took 0.21 seconds.

  1. Replies
    0
    Views
    142

    Independent shapes within a canvas

    Hi all,

    I need to write a program which basically accepts a bunch of inputs from the user and draws polygons.

    I was thinking of placing each polygon within its own JPanel: Easy enough i just...
  2. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    nope! location doesn't get set where i want it. Any progress with the rotation of the panel?
  3. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    ok will keep that in mind about the setVisible(),

    However for the methods in the paintComponent() that should be called in the constructor, the problem is calling them in the constructor causes...
  4. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    I apologize for that too. I mean the class containing the main(String[] args) method. its the first one and its called "testing"
  5. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    1) it does check the code again

    2) i am working with a null layout, I'm gonna need to position the "arrow shaped" polygon using absolute values in the outer panel.

    3) I am new to java swing/awt...
  6. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    Done, please help me understand the concept
  7. Replies
    14
    Views
    133

    Re: JPanel Rotation breaks the JPanel

    Done,

    To test the code replace the center point with any point and the rotation variable with any rotation. This paint is inside an overriden JPanel class.
  8. Replies
    14
    Views
    133

    JPanel Rotation breaks the JPanel

    I've got a Jpanel inside a bigger JPanel. I rotate the inner (smaller) Jpanel and this is the result i get:

    imgur: the simple image sharer

    as you can see, the panel containing the polygon gets...
  9. Replies
    2
    Views
    1,154

    Re: MouseMoved and MouseDragged problem

    sorry if its a bit long, this is as short as i could make it, thx again for taking a look:


    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.AffineTransform;
    import...
  10. Replies
    2
    Views
    1,154

    MouseMoved and MouseDragged problem

    hey guys,
    so heres the problem, i have a stick rotating around the center of the ball when the mouse moves. here are portions of the code:


    public void paintComponent(Graphics g){...
Results 1 to 10 of 10