Skip to content

Commit

Permalink
Added scroll bar to the main window
Browse files Browse the repository at this point in the history
  • Loading branch information
Eirenliel committed Jul 4, 2021
1 parent 00f2b08 commit a7aec87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/eiren/gui/TrackersList.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.border.BevelBorder;

import com.jme3.math.FastMath;
import com.jme3.math.Quaternion;
Expand All @@ -20,7 +19,6 @@
import io.eiren.util.StringUtils;
import io.eiren.util.ann.AWTThread;
import io.eiren.util.ann.ThreadSafe;
import io.eiren.util.ann.VRServerThread;
import io.eiren.util.collections.FastList;
import io.eiren.vr.VRServer;
import io.eiren.vr.processor.TrackerBodyPosition;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/io/eiren/gui/VRServerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.eiren.util.ann.AWTThread;
import io.eiren.vr.VRServer;

import java.awt.Container;
import java.awt.event.MouseEvent;
import java.util.TimerTask;

Expand All @@ -21,6 +20,8 @@ public class VRServerGUI extends JFrame {
private final SkeletonList skeletonList;
private java.util.Timer timer = new java.util.Timer();
private JButton resetButton;
private JScrollPane scroll;
private EJBox pane;

@AWTThread
public VRServerGUI(VRServer server) {
Expand All @@ -34,6 +35,8 @@ public VRServerGUI(VRServer server) {
this.trackersList = new TrackersList(server, this);
this.skeletonList = new SkeletonList(server, this);

add(scroll = new JScrollPane(pane = new EJBox(PAGE_AXIS), ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED));

build();
}

Expand All @@ -52,8 +55,6 @@ public void run() {

@AWTThread
private void build() {
Container pane = getContentPane();

pane.removeAll();

pane.add(new EJBox(LINE_AXIS) {{
Expand Down

0 comments on commit a7aec87

Please sign in to comment.