summaryrefslogtreecommitdiff
path: root/src/client/MainWindow.java
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-31 11:12:01 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-31 11:12:01 +0200
commitfbfa7d72b66e7960335ff3450b7c8f34bbb04693 (patch)
treef8f327ec9aed347242c75699bdfe340be4338954 /src/client/MainWindow.java
parent58a70ad52de0380e7cfee372bd88cbebe90ad412 (diff)
Clean code and new release
Diffstat (limited to 'src/client/MainWindow.java')
-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());