【Java开源代码栏目提醒】:网学会员鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“BackPanel.java”一文,供大家参考学习
/*
* BackPanel.java
*
* Created on 2008年7月24日, 下午1:45
*/
package com.mwq.print.tabbedPane;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
/**
*
* @author Administrator
*/
public class BackPanel extends javax.swing.JPanel {
private boolean hasFocus = false;
/** Creates new form BackPanel */
public BackPanel() {
initComponents();
addRadioButtonActionPerformed(null);
}
/** 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")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
addButtonGroup = new javax.swing.ButtonGroup();
alignButtonGroup = new javax.swing.ButtonGroup();
addLabel = new javax.swing.JLabel();
yesRadioButton = new javax.swing.JRadioButton();
noRadioButton = new javax.swing.JRadioButton();
photoLabel = new javax.swing.JLabel();
photoTextField = new javax.swing.JTextField();
photoButton = new javax.swing.JButton();
alignLabel = new javax.swing.JLabel();
defaultRadioButton = new javax.swing.JRadioButton();
fillRadioButton = new javax.swing.JRadioButton();
opaqueLabel = new javax.swing.JLabel();
opaqueSlider = new javax.swing.JSlider();
setBackground(new java.awt.Color(255, 255, 255));
addLabel.setText("添加:");
yesRadioButton.setBackground(new java.awt.Color(255, 255, 255));
addButtonGroup.add(yesRadioButton);
yesRadioButton.setText("是");
yesRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addRadioButtonActionPerformed(evt);
}
});
noRadioButton.setBackground(new java.awt.Color(255, 255, 255));
addButtonGroup.add(noRadioButton);
noRadioButton.setSelected(true);
noRadioButton.setText("否");
noRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addRadioButtonActionPerformed(evt);
}
});
photoLabel.setText("图片:");
photoTextField.setColumns(20);
photoTextField.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
photoTextFieldKeyTyped(evt);
}
});
photoButton.setText("...");
photoButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
photoButtonActionPerformed(evt);
}
});
alignLabel.setText("位置:");
defaultRadioButton.setBackground(new java.awt.Color(255, 255, 255));
alignButtonGroup.add(defaultRadioButton);
defaultRadioButton.setSelected(true);
defaultRadioButton.setText("默认");
fillRadioButton.setBackground(new java.awt.Color(255, 255, 255));
alignButtonGroup.add(fillRadioButton);
fillRadioButton.setText("充满");
opaqueLabel.setText("浓度:");
opaqueSlider.setBackground(new java.awt.Color(255, 255, 255));
opaqueSlider.setMajorTickSpacing(10);
opaqueSlider.setMaximum(95);
opaqueSlider.setMinimum(5);
opaqueSlider.setMinorTickSpacing(5);
opaqueSlider.setPaintTicks(true);
opaqueSlider.setSnapToTicks(true);
opaqueSlider.setValue(45);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(addLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(yesRadioButton)
.addGap(30, 30, 30)
.addComponent(noRadioButton))
.addGroup(layout.createSequentialGroup()
.addComponent(photoLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(photoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement