ho trovato questo codice, ma non so bene come utilizzarlo... potreste aitarmi... grazie
codice:public void start() { initLookAndFeel(); ArchivioClient.setAddress(serverInetAddress); }codice:private final void initLookAndFeel() { UIManager.getLookAndFeelDefaults().put("ClassLoader", getClass().getClassLoader()); try { UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel"); } catch(Exception exception) { } }codice:private void setServerInetAddress() { String inetAddress = JOptionPane.showInputDialog(jContentPane, "Inserisci indirizzo del server: ", "Indirizzo Server", 3); if(inetAddress == null || inetAddress.trim().length() == 0) { if(inetAddress != null) { JOptionPane.showMessageDialog(jContentPane, "Impostato il valore di default: localhost", "ATTENZIONE", 2); ArchivioClient.setAddress("localhost"); serverInetAddress = "localhost"; } } else { JOptionPane.showMessageDialog(jContentPane, (new StringBuilder("Impostato il nuovo indirizzo: ")).append(inetAddress).append("\nATTENZIONE! Il nuovo indirizzo sar\340 valido esclusivamente\nper l'esecuzione corrente").toString(), "Conferma Operazione", 1); ArchivioClient.setAddress(inetAddress); serverInetAddress = inetAddress; } }codice:public void init() { String iNetAddress = getParameter("hostname"); serverUrl = getParameter("url"); serverUrl = serverUrl.substring(0, serverUrl.lastIndexOf('/') + 1); serverInetAddress = iNetAddress.equals("") ? "localhost" : iNetAddress; ArchivioClient.setAddress(serverInetAddress); initLookAndFeel(); setContentPane(getJContentPane()); setSize(640, 480); setJMenuBar(getJMenuBar()); setVisible(true); }

Rispondi quotando