package com.zyp.view;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Vector;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import com.zyp.entity.Cinema;
import com.zyp.entity.Comment;
import com.zyp.entity.Hall;
import com.zyp.entity.Movie;
import com.zyp.entity.Session;
import com.zyp.entity.Ticket;
import com.zyp.entity.User;
import com.zyp.service.CinemaService;
import com.zyp.service.CommentService;
import com.zyp.service.HallService;
import com.zyp.service.MovieService;
import com.zyp.service.SessionService;
import com.zyp.service.TicketService;
import com.zyp.service.UserService;
import com.zyp.service.impl.CinemaServiceImpl;
import com.zyp.service.impl.CommentServiceImpl;
import com.zyp.service.impl.HallServiceImpl;
import com.zyp.service.impl.MovieServiceImpl;
import com.zyp.service.impl.SessionServiceImpl;
import com.zyp.service.impl.TicketServiceImpl;
import com.zyp.service.impl.UserServiceImpl;
public class UserUi implements ActionListener {
private User user;
private UserService uo=new UserServiceImpl();
private MovieService mo = new MovieServiceImpl();
private TicketService ticketservice=new TicketServiceImpl();
private CommentService commentservice=new CommentServiceImpl();
private CinemaService cinemaservice=new CinemaServiceImpl();
private SessionService sessionservice=new SessionServiceImpl();
private HallService hallservice=new HallServiceImpl();
private int size=0;
private int size1=0;
private int size2=0;
private int size3=0;
private int size4=0;
private int row = -1;// 行
private int row1=-1;
private int defaultcard;
private Comment ccomment;
private JLabel card0 = new JLabel();//用户
private JLabel card8 = new JLabel();//我的影票
private JLabel card1 = new JLabel();//热门
private JLabel card2 = new JLabel();//查找
private JLabel card3 = new JLabel();//科幻
private JLabel card4 = new JLabel();//动作
private JLabel card5 = new JLabel();//爱情
/*private JLabel card6 = new JLabel();//剧情
private JLabel card7 = new JLabel();//动漫
*/ private JFrame jf = new JFrame("电影购票系统");
private JMenuBar menuBar = new JMenuBar();
private Container con = jf.getContentPane();// 获得面板
private JPasswordField oldpass = new JPasswordField();
private JPasswordField newpass = new JPasswordField();
private JButton jupdatere=new JButton("更改评论");
private JButton jreport=new JButton("发表");
private JButton reFresh = new JButton("刷新");
private JButton btnexit = new JButton("退出");//
private JButton updatepass = new JButton("修改密码");
private JButton confirmUp = new JButton("确定");
private JButton cancel = new JButton("取消");
private JLabel oldjl;
private JLabel newjl;
private JTable ticktb;
private JTable movietb;
private ImageIcon userinfobg = new ImageIcon("images/userinfobg.jpg");
private Font font = new Font("楷体", 0, 20);
private Font font0 = new Font("楷体", 0, 25);
private Font font1 = new Font("楷体", 0, 16);
private Font font2 = new Font("楷体", 0, 15);
private Toolkit toolkit = Toolkit.getDefaultToolkit();
private Dimension sc = toolkit.getScreenSize();// 获得屏幕尺寸
private JLabel jIscomment=new JLabel();//是否评论
private JTextArea jcommentcontent=new JTextArea(30,30);//评论内容
private JLabel moviebtn_label;
private JButton moviecard1_btn;
private JButton delTicket;
private JLabel moviename;
private JLabel movielocality_language;
private JLabel movietype_grade;
private JTextField jsearch_nametext=new JTextField();
private JButton jsearch_jbutton=new JButton("搜索电影");
//评分前十
private JLabel[][] btn_label;
private JButton[] card1_btn;
private JLabel[][] dname;
private JLabel[][] locality_language;
private JLabel[][] type_grade;
//科幻部分
private JLabel[][] btn_label1;
private JButton[] card1_btn1;
private JLabel[][] dname1;
private JLabel[][] locality_language1;
private JLabel[][] type_grade1;
//动作部分
private JLabel[][] btn_label2;
private JButton[] card1_btn2;
private JLabel[][] dname2;
private JLabel[][] locality_language2;
private JLabel[][] type_grade2;
//爱情部分
private JLabel[][] btn_label3;
private JButton[] card1_btn3;
private JLabel[][] dname3;
private JLabel[][] locality_language3;
private JLabel[][] type_grade3;
private List<Ticket> ticketlist;
private List<Movie> movielist;
private List<Movie> list;
private List<Movie> sciencelist;
private List<Movie> actionlist;
private List<Movie> lovelist;
private JButton isrecharge;//选择充值按钮
private JLabel rechargeinfo;//提示
private JButton recharge;//充值按钮
private JTextField charge;//输入
private JLabel[] card0_label = new JLabel[2];
public UserUi(User u, int defaultcard) {
user = u;
this.defaultcard = defaultcard;
jf.setExtendedState(JFrame.MAXIMIZED_BOTH);
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.LEFT);// 点击栏位置
// 选项卡面板类
reFresh.addActionListener(this);
reFresh.setFont(font1);
btnexit.addActionListener(this);
btnexit.setFont(font1);
jf.setJMenuBar(menuBar);
menuBar.add(reFresh);
menuBar.add(btnexit);
tabbedPane.setFont(font);// 左栏字体,字号
tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);// 每个选项卡滚动模式
con.add(tabbedPane);
// 用户信息
tabbedPane.addTab("欢迎您," + user.getuName(), card0);
JLabel maxlabel = new JLabel();
for (int i = 0; i < 2; i++) {
card0_label[i] = new JLabel();
maxlabel.add(card0_label[i]);
card0_label[i].setFont(font0);
card0_label[i].setBounds(40, 70 + (i * 50), 500, 50);
}
card0_label[0].setText("您的信息如下: ");
card0_label[0].setForeground(Color.gray);
card0_label[1].setText("用户名 : " + user.getuName()+"余额:"+user.getBalance()+"元");
card0_label[1].setForeground(Color.gray);
updatepass.setBounds(40, 190, 120, 35);
updatepass.addActionListener(this);
updatepass.setBackground(Color.gray);
updatepass.setFont(font);
updatepass.setForeground(Color.white);
maxlabel.add(updatepass);
isrecharge=new JButton("充值金额");
isrecharge.setBounds(200, 190, 120, 35);
isrecharge.addActionListener(this);
isrecharge.setFont(font);
isrecharge.setForeground(Color.white);
isrecharge.setBackground(Color.gray);
maxlabel.add(isrecharge);
rechargeinfo=new JLabel("请输入金额");
rechargeinfo.setBounds(200, 250, 120, 30);
rechargeinfo.setFont(font);
rechargeinfo.setForeground(Color.LIGHT_GRAY);
rechargeinfo.setVisible(false);
maxlabel.add(rechargeinfo);
charge=new JTextField();
charge.setBounds(200, 300, 120, 30);
charge.setBackground(Color.GRAY);
charge.setFont(font);
charge.setForeground(Color.white);
charge.setFont(font);
charge.setVisible(false);
maxlabel.add(charge);
recharge=new JButton("充值");
recharge.setBounds(200, 380, 120, 30);
recharge.setForeground(Color.white);
recharge.setBackground(Color.GRAY);
recharge.setFont(font);
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
电影购票系统 (224个子文件)
UserUi.class 26KB
AddSession.class 15KB
SessionManager.class 15KB
MovieManage.class 14KB
HallManage.class 12KB
CinemaManage.class 11KB
SessionUi.class 9KB
TestDao.class 9KB
TicketManager.class 8KB
MovieUi.class 8KB
AddMovie.class 8KB
BuyTicketUi.class 7KB
MovieDaoImpl.class 6KB
Login.class 6KB
AdminUi.class 6KB
RegisterUi.class 5KB
CinemaDaoImpl.class 5KB
SessionDaoImpl.class 5KB
TestService.class 5KB
BaseDao.class 4KB
Movie.class 4KB
HallDaoImpl.class 4KB
UserDaoImpl.class 3KB
CommentDaoImpl.class 3KB
Session.class 3KB
TicketDaoImpl.class 3KB
LoginUi.class 2KB
User.class 2KB
MovieServiceImpl.class 2KB
SessionServiceImpl.class 2KB
CinemaServiceImpl.class 2KB
Comment.class 2KB
Hall.class 2KB
UserServiceImpl.class 2KB
HallServiceImpl.class 2KB
Cinema.class 2KB
Ticket.class 2KB
CommentServiceImpl.class 1KB
TicketServiceImpl.class 1KB
AdminUi$8.class 970B
AdminUi$7.class 969B
MovieService.class 938B
MovieDao.class 898B
SessionUi$2.class 888B
SessionManager$6.class 875B
TicketManager$5.class 868B
CinemaManage$7.class 862B
MovieManage$6.class 857B
AddSession$10.class 853B
HallManage$9.class 850B
HallManage$6.class 850B
AddSession$4.class 850B
AddSession$7.class 850B
UserUi$2.class 849B
UserUi$5.class 848B
CinemaDao.class 837B
CinemaService.class 805B
SessionManager$1.class 794B
TicketManager$1.class 764B
CinemaManage$1.class 759B
SessionDao.class 755B
MovieManage$1.class 754B
SessionUi$4.class 753B
SessionUi$5.class 753B
SessionUi$6.class 750B
HallManage$1.class 749B
AddSession$1.class 749B
MovieUi$1.class 741B
MovieUi$2.class 741B
AddMovie$1.class 739B
MovieUi$3.class 738B
AdminUi$1.class 734B
SessionManager$2.class 733B
SessionManager$4.class 729B
SessionManager$3.class 726B
TicketManager$3.class 723B
TicketManager$2.class 722B
SessionService.class 721B
CinemaManage$2.class 720B
SessionUi$3.class 719B
CinemaManage$5.class 717B
CinemaManage$3.class 717B
MovieManage$2.class 716B
CinemaManage$4.class 714B
MovieManage$4.class 711B
AddSession$2.class 709B
MovieManage$3.class 708B
HallManage$3.class 705B
SessionManager$7.class 702B
HallManage$2.class 702B
HallManage$4.class 702B
TicketManager$6.class 695B
AdminUi$3.class 693B
AddMovie$2.class 693B
AdminUi$6.class 691B
AdminUi$5.class 691B
AddMovie$3.class 690B
CinemaManage$8.class 689B
AdminUi$2.class 689B
AdminUi$4.class 687B
共 224 条
- 1
- 2
- 3
资源评论
- weixin_440007202018-12-06挺不错的,还可以
- 韶华倾负予你挚终官方号2018-11-28挺好的页面
- qq_383551202018-12-19数据库好像导入不进去啊
流云往事书
- 粉丝: 91
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功