Java JProgressBar createPanel(String message, JProgressBar progressBar)

Here you can find the source of createPanel(String message, JProgressBar progressBar)

Description

create Panel

License

Apache License

Parameter

Parameter Description
message a parameter
progressBar a parameter

Declaration

private static JPanel createPanel(String message, JProgressBar progressBar) 

Method Source Code

//package com.java2s;
/*/*w ww  .  j  a v  a 2  s  .co m*/
 * 
   SwingUtil.java
    
   Copyright 2004 KUBO Hiroya (hiroya@cuc.ac.jp).
    
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
    
   http://www.apache.org/licenses/LICENSE-2.0
    
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */

import javax.swing.BoxLayout;

import javax.swing.JLabel;

import javax.swing.JPanel;
import javax.swing.JProgressBar;

public class Main {
    /**
     * @param message
     * @param progressBar
     * @return
     */
    private static JPanel createPanel(String message, JProgressBar progressBar) {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        panel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
        panel.add(new JLabel(message));
        panel.add(progressBar);
        return panel;
    }
}

Related

  1. createJProgressBar(String title)
  2. createProgressBar()
  3. excutePost(String targetURL, String urlParameters, JProgressBar progress)
  4. generateProgressBarFor(Object... objs)
  5. incProgressBar(JProgressBar jpb)