Shows the window containing labels for the texts provided as attributes. @param texts
(String[] texts)
| 63 | * @param texts |
| 64 | */ |
| 65 | public synchronized void showDialog(String[] texts) { |
| 66 | centerBox.removeAll(); |
| 67 | |
| 68 | for(int i =0; i < texts.length; i++){ |
| 69 | centerBox.add(new JLabel(texts[i])); |
| 70 | } |
| 71 | |
| 72 | centerBox.validate(); |
| 73 | pack(); |
| 74 | /* |
| 75 | Point loc = frame.getLocation(); |
| 76 | loc.move(frame.getSize().width - getSize().width / 2 , |
| 77 | frame.getSize().height - getSize().height /2 ); |
| 78 | setLocation(loc); |
| 79 | */ |
| 80 | stop = false; |
| 81 | Thread thread = new Thread(Thread.currentThread().getThreadGroup(), |
| 82 | this, |
| 83 | "WaitDialog1"); |
| 84 | thread.setPriority(Thread.MAX_PRIORITY); |
| 85 | thread.start(); |
| 86 | setVisible(true); |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Shows the window containing the components provided as attributes. |
no test coverage detected