⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warnstoredialog.java

📁 java编的销售系统
💻 JAVA
字号:


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

class WarnStoreDialog extends JDialog
{
    
    private JLabel InfoLabel=new JLabel();
    
    public WarnStoreDialog(JFrame owner)
    {
		super(owner, "Warning Short Storage!", true);
		setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
		Container contentPane = getContentPane();
		
		JPanel panel = new JPanel();
      	panel.add(InfoLabel);
      
      	contentPane.add(panel, BorderLayout.CENTER); 
      	
      	JPanel ButtonPanel = new JPanel();
      	JButton upButton = new JButton("Update Storage");
      	upButton.addActionListener(new
         	ActionListener()
         	{
            	public void actionPerformed(ActionEvent event)
            	{
               		setVisible(false);
               		UpdateStoreFrame upframe=new UpdateStoreFrame();
               		upframe.show();
            	}
         	});
      
         ButtonPanel.add(upButton);
         contentPane.add(ButtonPanel, BorderLayout.WEST);
        
         JButton igButton = new JButton("Ignore");
         igButton.addActionListener(new
          	ActionListener()
          	{
             	public void actionPerformed(ActionEvent event)
             	{
                		setVisible(false);
                		
             	}
          	});
       
          ButtonPanel.add(igButton);
          contentPane.add(ButtonPanel, BorderLayout.EAST);
          
         
         
         setSize(800, 200);
    }
    
    public void setDialog(String information)
    {
    
    	InfoLabel.setText(information);
    }
    
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -