setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setAlignmentY(TOP_ALIGNMENT);
setAlignmentX(LEFT_ALIGNMENT);
Box firstThree = Box.createHorizontalBox();
Box secondThree = Box.createHorizontalBox();
Box thirdThree = Box.createHorizontalBox();
if(!enable) {
selection = "None";
}
group = new ButtonGroup();
DirectionButton b;
b = (DirectionButton) firstThree.add(new DirectionButton( tl_dot, tldn_dot, "NW", "Sets the orientation to the North-West", l, group, selection.equals("NW")));
b.setEnabled(enable);
b = (DirectionButton) firstThree.add(new DirectionButton( tm_dot, tmdn_dot, "N", "Sets the orientation to the North", l, group, selection.equals("N")));
b.setEnabled(enable);
b = (DirectionButton) firstThree.add(new DirectionButton( tr_dot, trdn_dot, "NE", "Sets the orientation to the North-East", l, group, selection.equals("NE")));
b.setEnabled(enable);
b = (DirectionButton) secondThree.add(new DirectionButton( ml_dot, mldn_dot, "W", "Sets the orientation to the West", l, group, selection.equals("W")));
b.setEnabled(enable);
b = (DirectionButton) secondThree.add(new DirectionButton( c_dot, cdn_dot, "C", "Sets the orientation to the Center", l, group, selection.equals("C")));
b.setEnabled(enable);
b = (DirectionButton) secondThree.add(new DirectionButton( mr_dot, mrdn_dot, "E", "Sets the orientation to the East", l, group, selection.equals("E")));
b.setEnabled(enable);
b = (DirectionButton) thirdThree.add(new DirectionButton( bl_dot, bldn_dot, "SW", "Sets the orientation to the South-West", l, group, selection.equals("SW")));
b.setEnabled(enable);
b = (DirectionButton) thirdThree.add(new DirectionButton( bm_dot, bmdn_dot, "S", "Sets the orientation to the South", l, group, selection.equals("S")));
b.setEnabled(enable);
b = (DirectionButton) thirdThree.add(new DirectionButton( br_dot, brdn_dot, "SE", "Sets the orientation to the South-East", l, group, selection.equals("SE")));
b.setEnabled(enable);
add(firstThree);
add(secondThree);
add(thirdThree);