summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/MainWindow.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/MainWindow.java b/src/client/MainWindow.java
index 15baf4c..1147592 100644
--- a/src/client/MainWindow.java
+++ b/src/client/MainWindow.java
@@ -28,16 +28,15 @@ public class MainWindow extends JFrame {
private Class<?> driverType;
private DriverManager drvMan=new DriverManager();
- public MainWindow() throws InstantiationException{
+ public MainWindow(Driver aDriver) throws InstantiationException{
this.initUI();
- Driver drv=drvMan.getDevice();
- if(drv==null){
+ if(aDriver==null){
System.err.println("No driver avalaible (try as root)");
System.exit(1);
}
else{
- this.driverType=drv.getType();
- this.keyboardTypeA=(DriverTypeA) drv;
+ this.driverType=aDriver.getType();
+ this.keyboardTypeA=(DriverTypeA) aDriver;
}
this.left=new JComboBox<>(Color.values());