BoxApp Demo


I am testing JGo Swing BoxApp demo and i have some questions.

  • How could i use change border to line border instead of rounded border.
  • Is there a method to make BoxArea none-dragable but resizable, moveable.


You can change the border by editing the init() method in Change myBorder to be a new JGoRectangle rather than a new JGoRoundRect. If you want to change the line to be solid rather than dashed, you can edit the definition of myDefaultPen.

When you say you want to make the BoxArea none-draggable, but movable, I’m not sure exactly what you mean. Draggable and movable sound like the same thing to me.


Its my mistake, let me clarify. I am trying to make gui designer and all components extend from boxarea. I am trying to make panel as a container and other nodes as a component so that i could drag and drop elements only to panel not textfield etc.


The essence of a BoxArea is to act like a container, so you might want to consider having containers that extend boxarea, but have your components extend some other class.

However, if you want both containers and components extend BoxArea, you could change the override of fireUpdate in This is where the application listens for a selection being moved, and determins whether the selection should be added to BoxArea or removed from a BoxArea.