java2的输入输出问题!!怎么把所选下拉框的内容存入文件??进入见程序

来源:百度知道 编辑:UC知道 时间:2024/06/21 12:37:20
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;

class IOExample extends JFrame implements ActionListener
{
JTextField tCustName;
JTextField tCellNumber;
JTextField tAge;
JComboBox tcomboCustPackge;
JPasswordField tPassword ;
JButton bLogin;

JLabel lCustName;
JLabel lCellNumber;
JLabel lAge;
JLabel lcomboCustPackge;
JLabel lPassword;

JPanel panel;

public IOExample()
{
panel=new JPanel();
panel=(JPanel)getContentPane();
panel.setLayout(new FlowLayout());

lCustName=new JLabel("Customer Login Name:");
tCustName=new JTextField(10);
lCellNumber=new JLabel("Customer Number:");
tCellNumber=new JTextField(5);
lAge=new JLabel("Age:");
tAge=new JTextField(2);
lcomboCustPackge=new JLabel("Package:");
Stri

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;

class IOExample extends JFrame implements ActionListener
{
JTextField tCustName;
JTextField tCellNumber;
JTextField tAge;
JComboBox tcomboCustPackge;
JPasswordField tPassword ;
JButton bLogin;

JLabel lCustName;
JLabel lCellNumber;
JLabel lAge;
JLabel lcomboCustPackge;
JLabel lPassword;

JPanel panel;

public IOExample()
{
panel=new JPanel();
panel=(JPanel)getContentPane();
panel.setLayout(new FlowLayout());

lCustName=new JLabel("Customer Login Name:");
tCustName=new JTextField(10);
lCellNumber=new JLabel("Customer Number:");
tCellNumber=new JTextField(5);
lAge=new JLabel("Age:");
tAge=new JTextField(2);
lcomboCustPackge=new JLabel(&qu