summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/gui/image/FTPDownloader_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/image/FTPDownloader_GUI.java35
1 files changed, 22 insertions, 13 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java
index 2ace42c6..ec92396b 100644
--- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java
+++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java
@@ -10,6 +10,7 @@ import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
+import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.SwingConstants;
@@ -45,8 +46,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
JLabel downspeed;
User user;
JProgressBar progressBar;
- String host = "141.79.128.121";
- //String host = "141.79.128.102";
+ String host = "141.79.128.102";
int port = 21;
String downloadFile = "";
static String arg = "";
@@ -81,6 +81,9 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
} catch (TException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
+ JOptionPane.showMessageDialog(null,
+ e1.getCause()+"\n"+e1.getMessage(),
+ "Debug-Message", JOptionPane.ERROR_MESSAGE);
}
task.cancel(true);
}
@@ -100,7 +103,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
}
setBackground(Color.WHITE);
- setTitle("Dozentenmodul *Prototyp*");
+ setTitle("Dozentenmodul *Prototyp* - Image herunterladen");
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int top = (screenSize.height - 722) / 2;
int left = (screenSize.width - 603) / 2;
@@ -217,17 +220,17 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
panel.setBounds(10, 11, 577, 57);
contentPanel.add(panel);
- JLabel label = new JLabel("Eingabe Ihrer Daten");
- label.setFont(new Font("Tahoma", Font.BOLD, 18));
- label.setBounds(10, 11, 509, 22);
- panel.add(label);
+ JLabel lblImageDownloader = new JLabel("Image Downloader");
+ lblImageDownloader.setFont(new Font("Tahoma", Font.BOLD, 18));
+ lblImageDownloader.setBounds(10, 11, 509, 22);
+ panel.add(lblImageDownloader);
- JTextPane textPane = new JTextPane();
- textPane.setText("Geben Sie hier bitte einen sprechenden Imagename sowie Ihre Kontaktdaten an");
- textPane.setEditable(false);
- textPane.setBackground(SystemColor.menu);
- textPane.setBounds(10, 36, 509, 32);
- panel.add(textPane);
+ JTextPane txtpnWhlenSieEinen = new JTextPane();
+ txtpnWhlenSieEinen.setText("W\u00E4hlen Sie einen Ort aus, um das von Ihnen gw\u00E4hlte Image erunter zu laden.");
+ txtpnWhlenSieEinen.setEditable(false);
+ txtpnWhlenSieEinen.setBackground(SystemColor.menu);
+ txtpnWhlenSieEinen.setBounds(10, 36, 509, 32);
+ panel.add(txtpnWhlenSieEinen);
JSeparator separator = new JSeparator();
separator.setBounds(0, 79, 597, 2);
@@ -290,6 +293,9 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
} catch (TException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
+ JOptionPane.showMessageDialog(null,
+ e1.getCause()+"\n"+e1.getMessage(),
+ "Debug-Message", JOptionPane.ERROR_MESSAGE);
}
}
thrift.closeThriftConnection();
@@ -333,6 +339,9 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
+ JOptionPane.showMessageDialog(null,
+ e.getCause()+"\n"+e.getMessage(),
+ "Debug-Message", JOptionPane.ERROR_MESSAGE);
}
task = new DownloadTask(host, port, user.userName, user.password,