Question: jsplitpane

Ads

 
 
 

Share on Google+Share on Google+

valarmathi
jsplitpane
1 Answer(s)      7 years ago
Posted in : Java Beginners
Ads
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

Ads









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
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads