public void startRecording() { statusLabel.setText("Status: Recording..."); statusLabel.setFont(new Font("Helvetica", Font.BOLD, 12)); statusLabel.setForeground(Color.red); recordButton.setLabel("Stop recording"); recording = true; viewer.setRecordingStatus(fnameField.getText()); }
public void stopRecording() { statusLabel.setText("Status: Not recording."); statusLabel.setFont(new Font("Helvetica", Font.PLAIN, 12)); statusLabel.setForeground(Color.black); recordButton.setLabel("Record"); recording = false; viewer.setRecordingStatus(null); }
/* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.Label getLabel1() { if (ivjLabel1 == null) { try { ivjLabel1 = new java.awt.Label(); ivjLabel1.setName("Label1"); ivjLabel1.setFont(new java.awt.Font("serif", 3, 24)); ivjLabel1.setAlignment(java.awt.Label.CENTER); ivjLabel1.setText("Name not found!"); ivjLabel1.setForeground(java.awt.Color.red); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } return ivjLabel1; }
public ReciveFile() { super("파일전송"); setLayout(null); lbl = new Label("파일 전송을 기다립니다."); lbl.setBounds(10, 30, 230, 20); lbl.setBackground(Color.gray); lbl.setForeground(Color.white); add(lbl); txt = new TextArea("", 0, 0, TextArea.SCROLLBARS_BOTH); txt.setBounds(10, 60, 230, 100); txt.setEditable(false); add(txt); btn = new Button("닫기"); btn.setBounds(105, 170, 40, 20); btn.setVisible(false); btn.addActionListener(this); add(btn); addWindowListener(new WinListener()); setSize(250, 200); show(); try { ServerSocket socket = new ServerSocket(port); Socket sock = null; FileThread client = null; try { sock = socket.accept(); client = new FileThread(this, sock); client.start(); } catch (IOException e) { System.out.println(e); try { if (sock != null) sock.close(); } catch (IOException e1) { System.out.println(e1); } finally { sock = null; } } } catch (IOException e) { } }