Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


valarmathi
jsplitpane
1 Answer(s)      5 years and 3 months ago
Posted in : Java Beginners



Advertisement
View Answers

October 14, 2009 at 12:42 PM


Hi Friend,

We have already posted you previously.

import javax.swing.*;
import javax.swing.event.*;

public class Test {
public static void main(String[] args) {
JFrame frame = new SplitPaneFrame();
frame.show();
}
}

class SplitPaneFrame extends JFrame implements ListSelectionListener {
public SplitPaneFrame() {
setSize(500, 400);
list = new JList(texts);
list.addListSelectionListener(this);
description = new JTextArea();
JPanel panel1=new JPanel();
panel1.add(list);
JPanel panel2=new JPanel();
panel2.add(description);
JPanel panel3=new JPanel();

JSplitPane innerPane = new JSplitPane();
innerPane.setLeftComponent(panel1);
innerPane.setRightComponent(panel2);
getContentPane().add(innerPane, "Center");
}
public void valueChanged(ListSelectionEvent event) {
JList source = (JList) event.getSource();
Display value = (Display) source.getSelectedValue();
description.setText(value.getDescription());
}

private JList list;

private JTextArea description;

private Display[] texts = { new Display("Environment", "\n * JBOSS Server \n * IBM MQ 6.0 version \n * JDK1.4 or above\n\n"
+ "System Information \n\n * WindowsXP/Windows98,Windows 2003 \n * 2GB RAM \n * 80GB Harddisk"),
new Display("OS Verification", "\n * Current O.S information will display \n * Using System class of JDK API.We are able to display all O.S information \n"
+" * JVM Verification "),
new Display("MQ Server Verification", "\n * Batch File will display all Active Services and store it into the File\n\n * toolservice.bat\n "
+" * toolservicepath.bat\n\n * Search the Service in the File\n\n * servicelist.txt\n * servicelistpath.txt\n\n * Verify the Server is started or Not\n * Display the IBM MQ Status in the Screen"),
new Display("JBoss Server Verification", "\n * Batch File will display all active process EXE Files \n\n * toolserver.bat \n * search the Service in the File \n\n "
+"* Tasklistservice.txt \n\n * Server Name,Port No,Path given by user \n * Verify the Server is started or Not \n") ,
new Display("Create Queue Manager", "\n * User Can create Queue Manager dynamically \n"),
new Display("Migration Queues", "\n Migration of Queues from ActiveMQ to IBM MQ \n\n * Display all Queues from JBOSS Server,if the JBOSS server xml file is present in valid path\n"
+" * Select a Queue to Migrate from ActiveMQ to IBM MQ \n * click on >> Button, User will select the Queue Manager after that selected Queue will store into the QueueManager of IBM MQ \n"
+" * If user will click on Refresh button.System will ask the QueueManager name.Once if the user will give the queuemanager.Corresponding Queues from the QueueManager will display \n"
+" * while doing migration,if Queues are already created in IBM MQ.System should display the Error Message")
};
}

class Display {
public Display(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


Related Tutorials/Questions & Answers:
jsplitpane - Java Beginners
jsplitpane  Hi, I need the example code for jsplitpane. I have divided into two splitpanes,while i am click the left side pane text or button ,then the corresponding text or button information will be displayed in the right
jsplitpane - Java Beginners
jsplitpane  Hi, I need the example code for jsplitpane. I have divided into two splitpanes,while i am click the left side pane text or button ,then the corresponding text or button information will be displayed in the right
Advertisements
jsplitpane - Java Beginners
(this); description = new JTextArea(); JSplitPane innerPane= new JSplitPane
jsplitpane - Java Beginners
jsplitpane  Hi, I need the example code for jsplitpane. I have divided into two splitpanes,while i am click the left side pane text or button...(); JSplitPane innerPane= new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, list
jsplitpane - Java Beginners
jsplitpane  Hi, I need the example code for jsplitpane. I have divided into two splitpanes,while i am click the left side pane text or button...(); JSplitPane innerPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, list
jsplitpane - Java Beginners
the example code for jsplitpane. I have divided into two splitpanes,while i am...(this); description = new JTextArea(); JSplitPane innerPane = new JSplitPane...(description); JPanel panel3=new JPanel(); JSplitPane innerPane = new
jsplitpane - Java Beginners
the example code for jsplitpane. I have divided into two splitpanes,while i am...(this); description = new JTextArea(); JSplitPane innerPane = new JSplitPane...(description); JPanel panel3=new JPanel(); JSplitPane innerPane = new JSplitPane
jsplitpane - Java Beginners
jsplitpane  Hi, I already post the question for three times. I need the example code for jsplitpane. I have divided into two splitpanes,while i am...(this); description = new JTextArea(); JSplitPane innerPane = new JSplitPane
java swings - Swing AWT
java swings  hi everyone, can we make a chain of frames with JSplitpane and run a shell script in any one of those frames
use of splitpane
use of splitpane  using JSplitPane split pane in three part. 1st in textField 2nd label and 3rd description. in textField we enter the primary key in textField than it show its all two part as label(image) and description of user
jList
panel = new JPanel(); panel.add(nameField); JSplitPane splitPane = new JSplitPane
Sharing a Table Model between JTable Components
to use the JSplitPane that is used to divide two components. These components... the HORIZONTAL_SPLIT. Both components are added in the object of JSplitPane..., there will be no changes in any table. Description of code: JSplitPane
java swings - Java Beginners
(description); final JSplitPane jSplitPane = new JSplitPane...); jSplitPane.setContinuousLayout(true); panel6.add(jSplitPane); return panel6
Java Swings problem - Swing AWT
Java Swings problem  Sir, I am facing a problem in JSplitPane. I want the divider in the splitpane to be customized. I have a splitpane with Horizontal orientation and here, there lies the divider between left component and right
jlist - Java Beginners
(deleteAll); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT
Tree View with database - Java Beginners
); tree.addTreeSelectionListener(this); description = new JTextArea(); JSplitPane innerPane= new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tree, description
Listeners - Java Beginners
()); } }; jbl.addActionListener(al); JSplitPane jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, jbl, jbr
SplitPane in Java Swing
Learn SplitPane in Java Swing In this section, you will learn how to create split pane using java swing. For this, we have used JSplitPane class...;   JSplitPane innerPane= new JSplitPane
Creating a Frame
a JSplitPane Container    Creating a JTabbedPane Container
Open Source XML Editor
(including JSplitPane, JScrollPane, JButton, and JTextArea). The JSplitPane
What is Java Swing?
value by dragging the slider. JSplitPane This class used
Advertisements
 

 

 

DMCA.com