|
|
| java swings |
Expert:valarmathi
Hi, I have two splitpanes,how to set the next button in the right side splitpane.
private JList list;
public JPanel splitpane() { JPanel panel4 = new JPanel(); JPanel panel5 = new JPanel(); JPanel panel6 = new JPanel(new GridLayout(1, 1));
description = new JTextArea(); list = new JList(texts); list.addListSelectionListener(this); list.setBackground(Color.decode("#99CC99")); list.setBounds(190, 40, 200, 20); description.setBounds(230, 140, 200, 50); description.setBackground(Color.decode("#99CC99")); panel4.setBackground(Color.decode("#99CC99")); panel4.add(list);
panel5.setBackground(Color.decode("#99CC99")); panel5.add(description);
final JSplitPane jSplitPane = new JSplitPane(); jSplitPane.setLeftComponent(panel4); jSplitPane.setRightComponent(panel5); jSplitPane.setContinuousLayout(true); panel6.add(jSplitPane); return panel6;
}
public void valueChanged(ListSelectionEvent event) { JList source = (JList) event.getSource(); Disp value = (Disp) source.getSelectedValue(); description.setText(value.getDescription()); }
private JTextArea description;
private Disp[] texts = { new Disp( "Environment"," Environment Information\n" +" \n * JBOSS Server \n\n * IBM MQ 6.0 version \n\n * JDK1.4 or above\n\n" + " System Information \n\n * WindowsXP/Windows98,Windows 2003 \n\n * 2GB RAM \n\n * 80GB Harddisk\n"), new Disp( "\n\n\n\n\n\nOS Verification"," OS Information\n" +"\n * Current O.S information will display \n\n * Using System class of JDK API.We are able to display all O.S information \n\n" + " * JVM Verification\n "), new Disp( "\n\n\n\n\n\nMQ Server Verification"," MQ Server Information\n"+ "\n * Batch File will display all Active Services and store it into the File\n\n a) toolservice.bat\n " + " b) toolservicepath.bat\n\n * Search the Service in the File\n\n a) servicelist.txt\n b)servicelistpath.txt\n\n * Verify the Server is started or Not\n\n * Display the IBM MQ Status in the Screen"), new Disp("\n\n\n\n\n\nJBoss Server Verification"," JBoss Server Information\n"+ "\n * Batch File will display all active process EXE Files \n\n a) toolserver.bat \n\n * search the Service in the File \n\n " + " a) Tasklistservice.txt \n\n * Server Name,Port No,Path given by user \n\n * Verify the Server is started or Not \n"), new Disp("\n\n\n\n\n\nCreate Queue Manager"," Create Queue Manager\n"+ "\n * User Can create Queue Manager dynamically \n"), new Disp("Migration Queues"," ActiveMQ To IBMMQ Migration\n"+ "\n Migration of Queues from ActiveMQ to IBM MQ \n\n * Display all Queues from JBOSS Server,if the JBOSS server \n xml file is present in valid path.\n\n " + "* Select a Queue to Migrate from ActiveMQ to IBM MQ \n\n * click on >> Button, User will select the Queue Manager after \n that selected Queue will store into the QueueManager of IBM MQ \n\n " + " * If user will click on Refresh button.System will ask the QueueManager name.\n Once if the user will give the queuemanager. Corresponding Queues \n from the QueueManager will display \n\n" + " * while doing migration,if Queues are already created in IBM MQ.\n System should display the Error Message") };
}
class Disp { public Disp(String n, String t) { name = n; des = t; }
public String toString() { return name; }
public String getDescription() { return des; }
private String name;
private String des; }
Thanks, Valarmathi |
| Answers |
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|