Search:

Type: Posts; User: Stone

Search: Search took 0.29 seconds.

  1. Replies
    5
    Views
    456

    Re: Drawing in a JPanel

    Thank you, the setPreferredSize does work! I was using the setSize method at the JPanel but it didn't had any effect
  2. Replies
    5
    Views
    456

    Re: Drawing in a JPanel

    Here is my code:


    import java.awt.Container;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.Insets;

    import javax.swing.*;
  3. Replies
    5
    Views
    456

    Drawing in a JPanel

    I want to make a drawing (A rectangle which is colored according RGB values that are scanned real-time), and add this drawing to a JPanel. This JPanel has to be added to the layout of the main frame....
Results 1 to 3 of 3