how to display panel just below input panel.?
-
Actually I have two Jpanel. One JPanel which takes input and the result is to be display in another JPanel.I just want that output Jpanel to be display just below the input JPanel.
-
OK, you have told us what you want, But what have you tried, and what problems have you encountered? Have you looked at http://docs.oracle.com/javase/tutorial/uiswing/components/panel.html[^]?
Quote:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/package Speech.WavePanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import javax.swing.JFrame;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;/**
*
* @author saikat
*/
public class output extends javax.swing.JFrame {String filepath; String fileContents; File file; BufferedReader br; /\*\* \* Creates new form output \*/ public output() { initComponents(); // JScrollPane.setSize(new java.awt.Dimension((xSize - graphFromScreen), graphVerticalSize)); // jScrollPane1.setPreferredSize(new java.awt.Dimension((xSize - graphFromScreen), graphVerticalSize)); // jScrollPane1.setMinimumSize(new java.awt.Dimension((xSize - graphFromScreen), graphVerticalSize)); } private void ScreenProperties() { jLabel1.setSize(new Dimension(800, 150)); jLabel1.setPreferredSize(new Dimension(800, 150)); JFrame frame= new JFrame(); frame.setLocation(1650, 430); JScrollPane scrollPane = new JScrollPane(jLabel1); add(scrollPane, BorderLayout.CENTER); scrollPane = new JScrollPane(); scrollPane.getViewport().add( jLabel1 ); //JFrame.add( scrollPane, BorderLayout.CENTER ); //JScrollPane pane = new JScrollPane(JScrollPane.VERTICAL\_SCROLLBAR\_ALWAYS, JScrollPane.HORIZONTAL\_SCROLLBAR\_AS\_NEEDED); //frame.setSize(500, 200); // frame.setContentPane(pane); } /\*\* \* This method is called from within the constructor to initialize the form. \* WARNING: Do NOT modify this code. The content of this method is always \* regenerated by the Form Editor. \*/ @SuppressWarnings("unchecked") // private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPan
-
Chinese :laugh: