public void showDialog() { AgentSession agentSession = FastpathPlugin.getAgentSession(); String workgroupName = StringUtils.parseName(agentSession.getWorkgroupJID()); if (mainFrame == null) { mainFrame = new JFrame(FpRes.getString("title.personal.chats")); } if (mainFrame.isVisible()) { return; } mainFrame.setIconImage(SparkManager.getMainWindow().getIconImage()); mainFrame.getContentPane().setLayout(new BorderLayout()); final JScrollPane scrollPane = new JScrollPane(this); scrollPane.getVerticalScrollBar().setBlockIncrement(50); scrollPane.getVerticalScrollBar().setUnitIncrement(20); mainFrame.getContentPane().add(scrollPane); mainFrame.pack(); mainFrame.setSize(400, 400); mainFrame.setLocationRelativeTo(SparkManager.getMainWindow()); mainFrame.setVisible(true); }
public static AgentSession getAgentSession() { return agentSession; }