(int screenNum)
| 60 | } |
| 61 | |
| 62 | public void setScreen(int screenNum) |
| 63 | { |
| 64 | if(currentScreenIndex != screenNum) |
| 65 | { |
| 66 | if(currentScreen instanceof StartStopPanel) |
| 67 | { |
| 68 | ((StartStopPanel) currentScreen).stopPanel(); |
| 69 | } |
| 70 | |
| 71 | this.removeAll(); |
| 72 | this.add(screens[screenNum]); |
| 73 | this.revalidate(); |
| 74 | this.repaint(); |
| 75 | |
| 76 | currentScreen = screens[screenNum]; |
| 77 | currentScreenIndex = screenNum; |
| 78 | |
| 79 | if(currentScreen instanceof StartStopPanel) |
| 80 | { |
| 81 | ((StartStopPanel) currentScreen).startPanel(); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | public JPanel getScreen(int screenNum) |
| 87 | { |
no test coverage detected