Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IQuestion connectClient() {
- try {
- // Objekt über den Namensdienst auf dem Server suchen
- Registry registryTed = LocateRegistry.getRegistry(mClientPanel
- .getMTfConnect().getText());
- @SuppressWarnings("unused")
- IQuestion mTedQuestion = (IQuestion) registryTed.lookup("TED");
- System.out.println("1: " + mTedQuestion.toString());
- // Bei erfolgreicher Verbindung Pop-up "HINWEIS" & Methodenaufruf
- // zum aktiveren/deaktivieren der GUI Elemente
- Component parentComponent = null;
- JOptionPane.showMessageDialog(parentComponent, "Verbunden mit "
- + mClientPanel.getMTfConnect().getText(), "HINWEIS",
- JOptionPane.INFORMATION_MESSAGE);
- mClientPanel.enable();
- return mTedQuestion;
- } catch (Exception e) {
- // Bei fehlgeschlagener Verbindung Pop-up "FEHLER"
- Component parentComponent = null;
- JOptionPane.showMessageDialog(parentComponent, mClientPanel
- .getMTfConnect().getText()
- + " konnte nicht gefunden werden", "FEHLER!",
- JOptionPane.ERROR_MESSAGE);
- }
- System.out.println("hier");
- return mTedQuestion;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement