X

Geertjan's Blog

  • February 24, 2012

Interesting NetBeans GUI Builder Behavior

Geertjan Wielenga
Product Manager

I changed the JPanel from yesterday's blog entry to a JTextField, added it to the Palette, dragged it into a JFrame and then discovered that even in design mode the vertical line moves left and right... which is cool but weird!

Above (top left black background) you see a deployed JFrame where the vertical line moves left and right in the JTextField, as expected, based on the code shown yesterday. But even in design mode in the IDE (right part of the screenshot above), the vertical line is ALSO moving left and right, while I'm designing the JFrame. Does that mean that the JFrame is somehow deployed even while I'm designing it?

Join the discussion

Comments ( 2 )
  • Jesse Glick Saturday, February 25, 2012

    The form editor is obliged to instantiate your components in the design view so you can see what they would actually look like (at least under some conditions); any animation is just part of that. If that is undesirable, the component should check java.beans.Beans.isDesignTime().


  • guest Monday, February 27, 2012

    How else that could be? It must be created and it must be painted. If you created round button, you would want to have it round when designing, not only when running.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.