Reordering components in a Java visual class

The Java™ Beans view displays components in the order in which they are added to their parent. You can use the Java Beans view to change this order.

About this task

When the source is parsed, the order that displays in the Java Beans view is determined by the order of the methods that create the relationship, such as add(Component,Object).

Tip: Depending on the layout manager being used, you can reorder most components on the Design view by dragging and dropping them. Your changes are reflected in the Java Beans view.

To use the Java Beans view to reorder children components:

Procedure

  1. In the Java Beans view, click and drag the component that you want to reorder.
  2. Release the mouse in the new position where you want the component to be placed: Use the feedback lines to determine proper placement:
    • As you drag the component, feedback is drawn as a line that shows the position of where the bean are to be moved. The following figure shows a label that has been selected and dragged below the scroll bar. The left edge of the feedback shows that the label is added at the same depth as the scroll bar and the label. So, it remains a child component of the navigation pane.
      Reordering components in the Java Beans view
    • As the mouse is moved around, the left edge of the feedback line is always drawn at the depth level in the tree where the item is inserted. The following figure shows that the left edge of the feedback line is level with the frame itself, and if the drag operation is completed the label becomes a top-level Java bean like the frame itself.
      Reordering components in the Java Beans view

Feedback