简易商品交易系统QR

xiaoxiao2021-02-28  51

import java.awt.BorderLayout; public class QR_cord extends JFrame { private JPanel contentPane; /**  * Launch the application.  */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { QR_cord frame = new QR_cord(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /**  * Create the frame.  */ public QR_cord() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 550, 473); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblNewLabel = new JLabel(""); lblNewLabel.setIcon(new ImageIcon("D:\\Desktop\\Feige\u56FE\u724720170711135311.png")); lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); lblNewLabel.setBounds(10, 37, 514, 398); contentPane.add(lblNewLabel); JButton btnNewButton = new JButton("\u00D7"); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new Supermarket().setVisible(true); } }); btnNewButton.setForeground(Color.BLACK); btnNewButton.setBackground(Color.RED); btnNewButton.setFont(new Font("微软雅黑", Font.PLAIN, 12)); btnNewButton.setBounds(464, 0, 45, 34); contentPane.add(btnNewButton); } }

第三部分:QR_cord界面

import java.awt.BorderLayout; public class QR_cord extends JFrame { private JPanel contentPane; /**  * Launch the application.  */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { QR_cord frame = new QR_cord(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /**  * Create the frame.  */ public QR_cord() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 550, 473); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblNewLabel = new JLabel(""); lblNewLabel.setIcon(new ImageIcon("D:\\Desktop\\Feige\u56FE\u724720170711135311.png")); lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); lblNewLabel.setBounds(10, 37, 514, 398); contentPane.add(lblNewLabel); JButton btnNewButton = new JButton("\u00D7"); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new Supermarket().setVisible(true); } }); btnNewButton.setForeground(Color.BLACK); btnNewButton.setBackground(Color.RED); btnNewButton.setFont(new Font("微软雅黑", Font.PLAIN, 12)); btnNewButton.setBounds(464, 0, 45, 34); contentPane.add(btnNewButton); } }

转载请注明原文地址: https://www.6miu.com/read-78389.html

最新回复(0)