public void init() { try { // data init loginId.setText("" + cfg.REQPARAM_SRC_LOGIN_ID); password.setText("" + cfg.REQPARAM_SRC_PASSWORD); // ui init setLayout(new GridLayout(2, 1)); Panel inputArea = new Panel(new BorderLayout(2, 2)); inputArea.add(contactList, "Center"); Panel bottomR = new Panel(new FlowLayout(FlowLayout.RIGHT)); bottomR.add(loginBtn); bottomR.add(logoutBtn); bottomR.add(closeBtn); Panel bottomL = new Panel(new FlowLayout()); bottomL.add(new Label("status:")); bottomL.add(clientStatus); bottomL.add(new Label(" contact:")); bottomL.add(contactListEntry); bottomL.add(addToContactList); bottomL.add(removeFromContactList); bottomL.add(getUserDetailsButton()); bottomL.add(getSendContactsButton()); Panel bottom = new Panel(new BorderLayout()); bottom.add("Center", bottomR); bottom.add("West", bottomL); inputArea.add(bottom, "South"); Panel leftTop = new Panel(new GridLayout(10, 1)); leftTop.add(new Label("login id:")); // 1 leftTop.add(loginId); // 2 leftTop.add(new Label("password:"******"")); leftTop.add(new Label("")); // 6 leftTop.add(new Label("send msg")); leftTop.add(sendMsg); // 8 leftTop.add(new Label("to")); leftTop.add(dstLoginId); // 10 Panel left = new Panel(new FlowLayout()); left.add(leftTop); inputArea.add(left, "West"); Panel eventLogPanel = new Panel(new BorderLayout()); eventLogPanel.add("Center", eventLog); Panel eventLogPanelButtons = new Panel(new FlowLayout(FlowLayout.RIGHT)); eventLogPanelButtons.add(clearEventLogBtn); eventLogPanel.add("South", eventLogPanelButtons); add(inputArea); add(eventLogPanel); setBackground(SystemColor.control); doLayout(); sendMsg.requestFocus(); } catch (Throwable tr) { CAT.error("exception", tr); System.exit(1); } }