问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

三国志霸王的大陆招不到武将?

发布网友 发布时间:2022-04-14 17:29

我来回答

3个回答

懂视网 时间:2022-04-14 21:50

import java.awt.*;import javax.swing.*;import java.awt.event.ActionListener;import java.awt.event.ActionEvent;import javax.swing.ImageIcon;import javax.swing.JTextArea;import javax.swing.JLabel;import java.awt.Color;import java.sql.*;impor

import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import java.awt.Color;
import java.sql.*;
import java.applet.Applet;
import java.applet.AudioClip;
import java.io.File;
import java.net.URL;

public class start extends JFrame {
	private String s=new String();
	private JTextField input = new JTextField();	
	private JTextArea myJTextField = new JTextArea();
	static Connection connection;
	static Statement statement ;
	private JScrollPane scrollBar;
	private final JLabel lblNewLabel_1 = new JLabel("");
	private final JButton btnNewButton_1 = new JButton("u6309u667Au529Bu6392u5E8F");
	private final JButton button = new JButton("u6309u6B66u529Bu6392u5E8F");
	public start()
	{
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		
		setBounds(80, 20, 1240, 700);
		getContentPane().setLayout(null);
		button.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u6309u6B66u529Bu6392u5E8F.jpg"));
		button.setFont(new Font("楷体", Font.PLAIN, 18));
		button.setBounds(689, 10, 127, 41);
		
		getContentPane().add(button);
		btnNewButton_1.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u6309u667Au529Bu6392u5E8F.jpg"));
		btnNewButton_1.setFont(new Font("楷体", Font.ITALIC, 18));
		btnNewButton_1.setBounds(482, 10, 127, 41);
		button.addActionListener(new orderlistener());
		btnNewButton_1.addActionListener(new orderlistener2());
		
		getContentPane().add(btnNewButton_1);
		input.setBounds(147, 10, 226, 41);
		getContentPane().add(input);
		input.addActionListener(new inputlistener());
		myJTextField.setForeground(new Color(255, 0, 0));
		myJTextField.setFont(new Font("Monospaced", Font.PLAIN, 13));
		myJTextField.setBackground(new Color(255, 255, 102));
		myJTextField.setBounds(1, 1, 1000, 600);
		getContentPane().add(myJTextField);
		myJTextField.setOpaque(false);
		
		JLabel lblNewLabel = new JLabel("u6B66u5C06uFF1A");
		lblNewLabel.setFont(new Font("长城行楷体", Font.ITALIC, 28));
		lblNewLabel.setBounds(33, 10, 112, 37);
		getContentPane().add(lblNewLabel);
		
		scrollBar = new JScrollPane(myJTextField);
		scrollBar.setBounds(10, 61, 1000, 600);
		getContentPane().add(scrollBar);
	
		scrollBar.setOpaque(false);
		scrollBar.getViewport().setOpaque(false);
		
		JButton btnNewButton = new JButton("BACK");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u8FD4u56DE.jpg"));
		btnNewButton.setFont(new Font("长城行楷体", Font.ITALIC, 22));
		btnNewButton.setBounds(898, 13, 94, 30);
		getContentPane().add(btnNewButton);
		lblNewLabel_1.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u80CCu666F.jpg"));
		
		lblNewLabel_1.setBounds(0, 0, 1240, 700);
		getContentPane().add(lblNewLabel_1);
		
		btnNewButton.addActionListener(new backlistener());
		 myJTextField.append("姓"+"		"+"字"+"		"+"武力"+"		"+"智力"+"		"+"德行"+"		"+"兵器"+"		"+"招募地"+"		"+"坐骑
");
	}
	
	
	class inputlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			 myJTextField.setText("姓"+"		"+"字"+"		"+"武力"+"		"+"智力"+"		"+"德行"+"		"+"兵器"+"		"+"招募地"+"		"+"坐骑
");
			try{
			 s=input.getText();	
			 String temps=new String();
			 if(s.equals("all"))
			 {
				temps="select * from v_hero ";
			 }
			 else
			 {
			 temps="select * from v_hero where 姓名='"+s+"'";
			 }
			//System.out.println(temps);
			ResultSet res=statement.executeQuery(temps);
			 while(res.next())
	 	{
				 myJTextField.append(res.getString(1)+"	"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"		"+res.getString(5)+"	"+res.getString(6)+"	"+res.getString(7)+"	"+res.getString(8)+"
");
	 	}
			
			}catch(SQLException ss )
			{
				myJTextField.append("error!");
			}
		}
	}
	class orderlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			myJTextField.setText("姓"+"		"+"字"+"		"+"武力"+"		"+"智力"+"		"+"德行"+"		"+"兵器"+"		"+"招募地"+"		"+"坐骑
");
			try{
				
				 String temps=new String();
					temps="select * from v_hero order by 武力 desc";
				ResultSet res=statement.executeQuery(temps);
				 while(res.next())
		 	{
					 myJTextField.append(res.getString(1)+"	"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"		"+res.getString(5)+"	"+res.getString(6)+"	"+res.getString(7)+"	"+res.getString(8)+"
");
		 	}
				}catch(SQLException ss )
				{
					myJTextField.append("error!");
				}
		}
	}
	class orderlistener2 implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			myJTextField.setText("姓"+"		"+"字"+"		"+"武力"+"		"+"智力"+"		"+"德行"+"		"+"兵器"+"		"+"招募地"+"		"+"坐骑
");
			try{
				 String temps=new String();
					temps="select * from v_hero order by 智力 desc";
				ResultSet res=statement.executeQuery(temps);
				 while(res.next())
		 	{
					 myJTextField.append(res.getString(1)+"	"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"		"+res.getString(5)+"	"+res.getString(6)+"	"+res.getString(7)+"	"+res.getString(8)+"
");
		 	}
				}catch(SQLException ss )
				{
					myJTextField.append("error!");
				}
		}
	}
	class backlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			start.this.setVisible(false);
			Login f9=new Login();
			f9.setVisible(true);
		}
	}
	
	 public static void main(String[] args) 
			 throws SQLException,ClassNotFoundException
			{
		  //new music();
		 
		 // System.out.println("ssss");
				Class.forName("oracle.jdbc.driver.OracleDriver"); 
				 connection =DriverManager.getConnection
					 ("jdbc:oracle:thin:@localhost:1521:MYSG","scott","scott");
				 statement =connection.createStatement();
				
				
				 Login log=new Login();
				 log.setVisible(true);
				 new music().play(new File("F:\cc.wav"));
				//start one= new start();
		 
				//one.setVisible(true);
			}
}
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.JButton;


import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Toolkit;

public class Login extends JFrame {
	private JPanel contentPane;
	public Login() 
	{
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("Three Kingdoms of heroes system");
		setBounds(80, 20, 1240, 700);
		contentPane = new JPanel();
		contentPane.setBackground(new Color(240, 240, 240));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnNewButton = new JButton("New button");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\1308051010460_u526Fu672C_u526Fu672Cwww.jpg"));
		btnNewButton.setBounds(46, 344, 240, 45);
		contentPane.add(btnNewButton);
		btnNewButton.addActionListener(new presslistener());
		
		JButton btnNewButton_1 = new JButton("New button");
		btnNewButton_1.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\1308051010460_u526Fu672C_u526Fu672C_u526Fu672Cwwwg.jpg"));
		btnNewButton_1.setBounds(46, 444, 240, 47);
		contentPane.add(btnNewButton_1);
		btnNewButton_1.addActionListener(new presslistener2());
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\13126052172554n4gg4569www.png"));
		lblNewLabel.setBounds(0, 0,1240, 700);
		contentPane.add(lblNewLabel);
	}
	class presslistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			Login.this.setVisible(false);
			select f2=new select(); 
			f2.setVisible(true);
			
		}	
	}
	class presslistener2 implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			Login.this.setVisible(false);
			dba f3=new dba(); 
			f3.setVisible(true);
		}	
	}
}
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import java.awt.Toolkit;

public class select extends JFrame {

	private JPanel contentPane;

	public select() {
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(0, 0, 1240, 700);
		setTitle("选择模式");
		
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnNewButton = new JButton("New button");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u82F1u96C41.jpg"));
		btnNewButton.setBounds(49, 307, 180, 48);
		contentPane.add(btnNewButton);
		btnNewButton.addActionListener(new presslistener());
		
		JButton btnNewButton_1 = new JButton("New button");
		btnNewButton_1.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u8BF8u4FAF1.jpg"));
		btnNewButton_1.setBounds(49, 407, 180, 48);
		contentPane.add(btnNewButton_1);
		btnNewButton_1.addActionListener(new presslistener2());
		
		JButton btnNewButton_2 = new JButton("New button");
		btnNewButton_2.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u6218u4E891.jpg"));
		btnNewButton_2.setBounds(49, 507, 180, 48);
		contentPane.add(btnNewButton_2);
		btnNewButton_2.addActionListener(new presslistener3());
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\90e150338ea4ea55a65527cef1cddded_u526Fu672C.jpg"));
		label.setBounds(0, 0, 1240, 700);
		contentPane.add(label);
		
	}
	class presslistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			select.this.setVisible(false);
			start f4=new start(); 
			f4.setVisible(true);
		}	
	}
	class presslistener2 implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			select.this.setVisible(false);
			country f5=new country(); 
			f5.setVisible(true);
		}	
	}
	class presslistener3 implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			select.this.setVisible(false);
			war f6=new war(); 
			f6.setVisible(true);
		}	
	}

}
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.ImageIcon;
import java.awt.Toolkit;

public class country extends JFrame {

	private JPanel contentPane;
	private String s=new String();
	private String s2=new String();
	private JTextField input = new JTextField();
	private JTextField input2 = new JTextField();
	private JTextArea myJTextField = new JTextArea();
	private JScrollPane scrollBar;
	private final JLabel label = new JLabel("u6B66u5C06uFF1A");
	private final JLabel label_1 = new JLabel("u4E3Bu516CuFF1A");
	
	public country() {
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("武将从属查询");
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		setBounds(80, 20, 1240, 700);
		getContentPane().setLayout(null);
		//myJTextField.setOpaque(false);
		
		input.setBounds(183, 10, 190, 41);
		getContentPane().add(input);
		input.addActionListener(new inputlistener());
		
		input2.setBounds(480, 10, 205, 41);
		getContentPane().add(input2);
		input2.addActionListener(new inputlistener());
		myJTextField.setForeground(new Color(255, 0, 0));
		myJTextField.setFont(new Font("Monospaced", Font.PLAIN, 13));
		myJTextField.setBackground(new Color(255, 245, 238));
		myJTextField.setBounds(10, 61, 1000, 629);
		getContentPane().add(myJTextField);
		input.setBounds(147, 10, 226, 41);
		
		scrollBar = new JScrollPane(myJTextField);
		scrollBar.setBounds(10, 61, 1000, 629);
		getContentPane().add(scrollBar);
		label.setFont(new Font("长城行楷体", Font.ITALIC, 28));
		label.setBounds(42, 10, 95, 39);
		
		myJTextField.setOpaque(false);
		scrollBar.setOpaque(false);
		scrollBar.getViewport().setOpaque(false);
		
		contentPane.add(label);
		label_1.setFont(new Font("长城行楷体", Font.ITALIC, 28));
		label_1.setBounds(393, 12, 95, 39);
		
		contentPane.add(label_1);
		
		JButton btnNewButton = new JButton("BACK");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u8FD4u56DE.jpg"));
		btnNewButton.setForeground(new Color(255, 0, 0));
		btnNewButton.setFont(new Font("长城行楷体", Font.ITALIC, 22));
		btnNewButton.setBounds(1061, 21, 95, 30);
		getContentPane().add(btnNewButton);
		
			JLabel lblNewLabel = new JLabel("");
			lblNewLabel.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u57CEu5E02.jpg"));
			lblNewLabel.setBounds(0, 0, 1240, 700);
			contentPane.add(lblNewLabel);
		btnNewButton.addActionListener(new backlistener());
	}
	
	class inputlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			
			try{
			 s=input.getText();
			 s2=input2.getText();
			 String temps=new String();
			 if(s2.equals("all"))
			 {
				 myJTextField.setText("主公名"+"		"+"现役武将数"+"		"+"兵力
");
				temps="select hname,num_of_hero,num_of_army from country,hero where country.ono=hero.hno";
				ResultSet res=start.statement.executeQuery(temps);
				 while(res.next())
		 	{
					 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"		"+"
");
		 	}
			 }
			 else if(s.equals("all"))
			 {
				 myJTextField.setText("武将"+"		 "+"主公"+"		 "+"忠诚"+"		 "+"时期
");
				 temps="select * from v_hero_owner";
				 ResultSet res=start.statement.executeQuery(temps);
					 while(res.next())
			 	{
						 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"
");
			 	}
			 }
			 else 
			 {
				 myJTextField.setText("武将"+"		 "+"主公"+"		 "+"忠诚"+"		 "+"时期
");
				 temps="select * from v_hero_owner where 武将='"+s+"' and 主公='"+s2+"'";
				 ResultSet res=start.statement.executeQuery(temps);
					 while(res.next())
			 	{
						 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"
");
			 	} 
			 }
			System.out.println(temps);
			
			
			}catch(SQLException ss )
			{
				myJTextField.append("error!");
			}
		}
	}
	class backlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			country.this.setVisible(false);
			Login f9=new Login();
			f9.setVisible(true);
		}
	}
}
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.ImageIcon;
import java.awt.Toolkit;

public class war extends JFrame {

	private JPanel contentPane;
	private String s=new String();
	private String s2=new String();
	private JTextField input = new JTextField();
	private JTextField input2 = new JTextField();
	private JTextArea myJTextField = new JTextArea();
	private JScrollPane scrollBar;
	private final JLabel label = new JLabel("u6B66u5C06uFF1A");
	private final JLabel label_1 = new JLabel("u6218u4E89uFF1A");
	
	public war() {
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("战争战绩查询");
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		setBounds(80, 20, 1240, 700);
		getContentPane().setLayout(null);
		
		input.setBounds(183, 10, 190, 41);
		getContentPane().add(input);
		input.addActionListener(new inputlistener());
		
		input2.setBounds(491, 10, 231, 41);
		getContentPane().add(input2);
		input2.addActionListener(new inputlistener());
		myJTextField.setForeground(new Color(255, 0, 0));
		
		myJTextField.setFont(new Font("Monospaced", Font.PLAIN, 13));
		myJTextField.setBackground(Color.YELLOW);
		myJTextField.setBounds(10, 61, 1000, 600);
		getContentPane().add(myJTextField);
		input.setBounds(147, 10, 226, 41);
		
		
		scrollBar = new JScrollPane(myJTextField);
		scrollBar.setBounds(10, 61, 1000, 600);
		getContentPane().add(scrollBar);
		label.setFont(new Font("长城行楷体", Font.ITALIC, 27));
		label.setBounds(35, 10, 91, 38);
		
		contentPane.add(label);
		label_1.setFont(new Font("长城行楷体", Font.ITALIC, 27));
		label_1.setBounds(386, 10, 91, 38);
		
		contentPane.add(label_1);
		
		myJTextField.setOpaque(false);
	 scrollBar.setOpaque(false);
		scrollBar.getViewport().setOpaque(false);
		
		JButton btnNewButton = new JButton("BACK");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u8FD4u56DE.jpg"));
		btnNewButton.setFont(new Font("长城行楷体", Font.ITALIC, 22));
		btnNewButton.setBounds(1102, 13, 91, 30);
		getContentPane().add(btnNewButton);
		
			JLabel lblNewLabel = new JLabel("");
			lblNewLabel.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u6218u4E89.jpg"));
			lblNewLabel.setBounds(0, 0, 1240, 700);
			contentPane.add(lblNewLabel);
		btnNewButton.addActionListener(new backlistener());
	}
	class inputlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			
			try{
			 s=input.getText();
			 s2=input2.getText();
			 String temps=new String();
			 if(s.equals("all"))
			 {
				 myJTextField.setText("武将名"+"			"+"参加的战争"+"			"+"主要战绩
");
				temps="select * from v_hero_war ";
				ResultSet res=start.statement.executeQuery(temps);
				 while(res.next())
		 	{
					 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"		"+"
");
		 	}
			 }
			 else if(s2.equals("all"))
			 {
				 myJTextField.setText("战争名"+"		 "+"参战阵营"+"		 "+"战果"+"		 "+"战争地点"+"				"+"时间
");
				 temps="select * from war";
				 ResultSet res=start.statement.executeQuery(temps);
					 while(res.next())
			 	{
						 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"		"+res.getString(4)+"		"+res.getString(5)+"
");
			 	}
			 }
			 else 
			 {
				 myJTextField.setText("武将名"+"			"+"参加的战争"+"			"+"主要战绩
");
				 temps="select * from v_hero_war where 武将='"+s+"' and 战争='"+s2+"'";
				 ResultSet res=start.statement.executeQuery(temps);
					 while(res.next())
			 	{
						 myJTextField.append(res.getString(1)+"		"+res.getString(2)+"		"+res.getString(3)+"
");
			 	} 
			 }
			System.out.println(temps);
			
			
			}catch(SQLException ss )
			{
				myJTextField.append("error!");
			}
		}
	}
	class backlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			war.this.setVisible(false);
			Login f9=new Login();
			f9.setVisible(true);
		}
	}
}
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.Color;
import java.awt.Toolkit;


public class dba extends JFrame {

	private JPanel contentPane;
	public dba() {
		setIconImage(Toolkit.getDefaultToolkit().getImage("D:\app\Administrator\oradata\mysg\u56FEu6807.png"));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(80, 20, 1240, 700);
		setTitle("欢迎管理");
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnNewButton = new JButton("u589Eu52A0u6B66u5C06");
		btnNewButton.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u589Eu52A0u6B66u5C06.jpg"));
		btnNewButton.setForeground(new Color(255, 0, 0));
		btnNewButton.setBackground(new Color(105, 105, 105));
		btnNewButton.setFont(new Font("长城行楷体", Font.ITALIC, 28));
		btnNewButton.setBounds(80, 81, 164, 42);
		contentPane.add(btnNewButton);
		btnNewButton.addActionListener(new addlistener());
		
		JButton btnNewButton_1 = new JButton("u5220u9664u6B66u5C06");
		btnNewButton_1.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\u5220u9664u6B66u5C06.jpg"));
		btnNewButton_1.setForeground(new Color(255, 0, 0));
		btnNewButton_1.setFont(new Font("长城行楷体", Font.ITALIC, 28));
		btnNewButton_1.setBounds(973, 81, 164, 42);
		contentPane.add(btnNewButton_1);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon("D:\app\Administrator\oradata\mysg\Three_Kingdoms.jpg"));
		lblNewLabel.setBounds(0, 0, 1240, 700);
		contentPane.add(lblNewLabel);
		btnNewButton_1.addActionListener(new deletelistener());
	}
	class addlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			dba.this.setVisible(false);
			addhero f7=new addhero(); 
			f7.setVisible(true);
		}	
	}
	class deletelistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			dba.this.setVisible(false);
			deletehero f8=new deletehero(); 
			f8.setVisible(true);
		}	
	}

}
import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;

public class addhero extends JFrame {

	private JPanel contentPane;
	private JTextField []textField=new JTextField[6];
	//private JTextField textField_1;
	//private JTextField textField_2;
	//Field textField_3;
	//private JTextField textField_4;
	//private JTextField textField_5;

	JFrame tt;
	public addhero() {
		setTitle("增加英雄");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(50, 50, 1000, 701);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		getContentPane().setLayout(null);
		
		
		for(int i=0;i<6;i++)
			textField[i] = new JTextField();
		textField[0].setBounds(93, 24, 220, 37);
		contentPane.add(textField[0]);
		textField[0].setColumns(10);
		
		System.out.println("sadas");
		//textField[1] = new JTextField();
		textField[1].setColumns(10);
		textField[1].setBounds(93, 91, 220, 37);
		contentPane.add(textField[1]);
		
		//textField[2]= new JTextField();
		textField[2].setColumns(10);
		textField[2].setBounds(93, 158, 220, 37);
		contentPane.add(textField[2]);
		
		//textField[3] = new JTextField();
		textField[3].setColumns(10);
		textField[3].setBounds(93, 222, 220, 37);
		contentPane.add(textField[3]);
		
		//textField[4] = new JTextField();
		textField[4].setColumns(10);
		textField[4].setBounds(93, 283, 220, 37);
		contentPane.add(textField[4]);
		
		//textField[5] = new JTextField();
		textField[5].setColumns(10);
		textField[5].setBounds(93, 349, 220, 37);
		contentPane.add(textField[5]);
		
		
		for(int i=0;i<6;i++)
			textField[i].addActionListener(new addlistener2());
		
		JLabel label = new JLabel("u6B66u5C06u540D");
		label.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label.setBounds(10, 24, 73, 37);
		contentPane.add(label);
		
		JLabel label_1 = new JLabel("u5B57");
		label_1.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label_1.setBounds(10, 91, 73, 37);
		contentPane.add(label_1);
		
		JLabel label_2 = new JLabel("u6B66u529B");
		label_2.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label_2.setBounds(10, 158, 73, 37);
		contentPane.add(label_2);
		
		JLabel label_3 = new JLabel("u667Au529B");
		label_3.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label_3.setBounds(10, 222, 73, 37);
		contentPane.add(label_3);
		
		JLabel label_4 = new JLabel("u54C1u5FB7");
		label_4.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label_4.setBounds(10, 283, 73, 37);
		contentPane.add(label_4);
		
		JLabel label_5 = new JLabel("u6B66u5668");
		label_5.setFont(new Font("长城行楷体", Font.PLAIN, 21));
		label_5.setBounds(10, 349, 73, 37);
		contentPane.add(label_5);
	}
	class addlistener2 implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			try{
			
			 String []s=new String[6];
			 for(int i=0;i<6;i++)
			 {
				 s[i]=new String();
				 s[i]=textField[i].getText();	
			 }
		
			String temps=new String();
			temps="insert into hero values(null,'"+s[0]+"','"+s[1]+"',"+s[2]+","+s[3]+","+s[4]+",'"+s[5]+"',null,null)";
			
			System.out.println(temps);
			ResultSet res=start.statement.executeQuery(temps);
			 tt=new JFrame();
			tt.setBounds(100, 100, 500, 80);
			JButton ta = new JButton("恭喜!武将"+s[0]+"添加成功! 点击返回");
			tt.add(ta);
			tt.setVisible(true);
			ta.addActionListener(new backlistener());
			}catch(SQLException ss )
			{
				textField[0].setText("error!");
			}
		}
	}
	class backlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			addhero.this.setVisible(false);
			tt.setVisible(false);
			dba f8=new dba();
			f8.setVisible(true);
		}
	}
}
import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;

public class deletehero extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	JFrame tt;
	public deletehero() {
	 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("删除英雄");
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		textField = new JTextField();
		textField.setBounds(125, 55, 195, 63);
		contentPane.add(textField);
		textField.setColumns(10);
	 textField.addActionListener(new deletelistener());
		
		
		JLabel label = new JLabel("u6B66u5C06u540D");
		label.setFont(new Font("长城行楷体", Font.ITALIC, 30));
		label.setBounds(10, 55, 105, 63);
		contentPane.add(label);
	}
	class deletelistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			try{
				
				 String s=new String();
				 s=textField.getText();
				String temps=new String();
				temps="delete from hero where hname='"+s+"'";
				
				System.out.println(temps);
				ResultSet res=start.statement.executeQuery(temps);
				 tt=new JFrame();
				tt.setBounds(100, 100, 500, 80);
				JButton ta = new JButton("恭喜!武将"+s+"删除成功! 点击返回");
				tt.add(ta);
				tt.setVisible(true);
				ta.addActionListener(new backlistener());
				}catch(SQLException ss )
				{
					textField.setText("error!");
				}
		}
	}
	class backlistener implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{ 
			deletehero.this.setVisible(false);
			tt.setVisible(false);
			dba f8=new dba();
			f8.setVisible(true);
		}
	}
}
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
import java.io.File;

public class music{
 private AudioInputStream stream = null;
 private AudioFormat format = null;
 private SourceDataLine m_line;
 public void play(File fileName)
 {
 try { 
 stream = AudioSystem.getAudioInputStream(fileName);
 // At present, ALAW and ULAW encodings must be converted
 // to PCM_SIGNED before it can be played
 format = stream.getFormat();
 if (format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED) {
  format = new AudioFormat(
  AudioFormat.Encoding.PCM_SIGNED,
  format.getSampleRate(),
  16,
  format.getChannels(),
  format.getChannels() * 2,
  format.getSampleRate(),
  false); // big endian
  stream = AudioSystem.getAudioInputStream(format, stream);
 }
 // Create the clip
 DataLine.Info info = new DataLine.Info(SourceDataLine.class, stream.getFormat(), AudioSystem.NOT_SPECIFIED);
 m_line = (SourceDataLine) AudioSystem.getLine(info);
 m_line.open(stream.getFormat(),m_line.getBufferSize());
 m_line.start();
 int numRead = 0;
 byte[] buf = new byte[m_line.getBufferSize()];
 while ((numRead = stream.read(buf, 0, buf.length)) >= 0) {
  int offset = 0;
  while (offset < numRead) {
  offset += m_line.write(buf, offset, numRead-offset);
  }
 }
 m_line.drain();
 m_line.stop();
 m_line.close();
 stream.close();
 } catch (Exception e) {
 e.printStackTrace();
 } 
 }
 public double getDuration()
 {
 return m_line.getBufferSize() /
 (m_line.getFormat().getFrameSize() * m_line.getFormat().getFrameRate());
 }
 public double getDecision()
 {
 return m_line.getMicrosecondPosition()/1000.0;
 }
 
}

热心网友 时间:2022-04-14 18:58

哥们听你这样玩,我也想吐血,有些城没武将的,有些是在特定的地方。特别注意,并州只有一个武将,赵云在幽州,还有荆州基本没什么将,像孔明等基本在武陵和和江陵收的。还有不懂再问…

热心网友 时间:2022-04-14 20:16

三国志的武将不管哪个版本,不是随便在一个城里死找你就能找到的,像你找了半天一个没找到说明并州没有武将可寻,你就应该着力发展内政军事,开疆拓土到新的城市去搜索,另外一些特别武将只会在特定的城市出现。
霸王的大陆鲁肃为什么录用不了

几率低。根据查询《霸王的大陆》游戏简介显示,武将只有特定的君主去邀请时,才会高几率获得。孙策:甘宁、鲁肃、诸葛瑾、吕蒙、陆逊并不是其他君主就收不了,只是几率低,需要多找几次。对应君主的统治度低,也会降低几率,因此鲁肃录用不了。

三国志2霸王的大陆

会成为在野武将,但不都会都在原来城里,而是会分散到周边的城里。通过寻找会找到一些原来的武将,还有一些会跑到别的城里去了。

三国志霸王的大陆里,我的游戏武将去了下野~怎么就找不到我的武将了啊...

回答:下野就是让武将成为在野状态 换句话说 就是你不要他了 在哪里下野就在哪里找 比如 你在江夏让周瑜下野 就在江夏搜 下野决对不是一个地名……

三国志霸王的大陆招武将有什么秘诀

刘备初期就靠一个关羽,城少行动力也少,离间个吕布要几个月,一般降到20到30就保存下笼络吧,不然马腾等会抢人的,L/S打法。。

三国志2霸王的大陆如何挖武将

1、作战时如果把敌方武将打到精疲力竭,那么这个武将在这次游戏中就不会出现了,等同于死了。但是可以通过修改ROM实现打死后在该城池可被搜索到。2、单挑抓武将的话,必须要求对方忠诚足够低,30以下吧,才有可能说服他。我一般抓武将都采用把他打到30血以下,然后派兵包围的方法来抓。

三国志霸王大陆的诸葛亮,周瑜,司马懿,赵云怎么招募

周瑜是自己投靠孙策的,招募不了,唯一的办法是,打仗的时候,用小兵把他打到空血,然后包围,他自己会投降过来了。招募英雄时要注意:三国志的武将不管哪个版本,不是随便在一个城里死找你就能找到的,你就应该着力发展内政军事,开疆拓土到新的城市去搜索招募,另外一些特别武将只会在特定的城市出现。

霸王的大陆武将时间表

5、霸王的大陆武将什么时间出场出场时间详解甘宁190年在江夏,魏延191年在长沙,姜维209年在天水。以上这些都是有名的猛将,玩家只要招募到这些大将何愁三国不能一统呀。而至于关羽、颜良等原配大将就不必多说了。6、三国志霸王的大陆吕布在洛阳。马腾出现在凉州,韩遂出现在凉州,贾翊出现在长安,吕布出现...

我玩三国志霸王的大陆游戏时发现这一个问题为什么我用田丰登用赵云会...

没办法,能力比较突出的武将是要跟随特定主公的,比如赵云会比较容易跟随刘备,但也不是别的主公招不了赵云,只是概率比较低,拿赵云来说,如果刘备招就是100%,别的主公就是20%左右,你在探索到武将但还没出现赵云是否说跟随的时候即时存档,不跟随就即时读档,过几次他就说愿效犬马之劳了,其他...

三国志2霸王的大陆攻略分析?

31到50的修正为30,50到70的修正为10 若受方武将忠诚在70以上时,则笼络不会成功. 十面埋伏的成功率为100%. 对于劫火 共杀 水攻 连环这样影响多个部队的计策,其成功率只看被点的那个武将.也就是说和白痴靠在一起就认栽吧. 看来所谓的按A可以提高成功率的说法只是心理作用. 如果同样智力不如...

三国志2霸王的大陆问题

2.如果城市有书屋,还是让所有武将都读书到上限,对战争有利,武将不易中计谋 3.FC时代玩这个游戏,在开始选单那边不按Start而是旋转手柄方向盘再按Select进入游戏,我方都城各项值都是上限,都不用发展了,如果是PC模拟器,兄台百度看看,应该有很多秘籍 再说招降经典武将:1.用诸葛亮这样的大牛挖墙角...

三国志霸王的大陆武将 三国志2霸王的大陆隐藏武将 三国志2霸王的大陆武将死亡 三国志2霸王的大陆武将出场时间 三国志2霸王大陆武将表 三国志2霸王的大陆武器 三国志3霸王的大陆 三国志2霸王的大陆 三国志2霸王的大陆周瑜
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
开关后面是L、L1、L2怎么接线呢? 以掌声为话题的作文!600字!!!初中的水平作文 望亭到无锡硕放经发七路怎么走 ...例如深大的是。370/170.他们这两个分数是怎么算的?这两个分数分别满... 专插本2B的分数线是看学校定的么? 玩nba2k23手游影响学习 什么是分子式,实验室,最简式 请问一下民生信用卡过期了要注销吗 实验式和分子式的区别 ...确定拿不到学位证了。可以拿到毕业证。家里人想让去澳大利... 什么肉丸是用猪淋巴结做的? 淋巴摄入过多,有害健康,哪些位置的肉是淋巴? 这个是淋巴肉吗? 平面构成中发射构成在现实生活中有哪些? 我的是纯数字的怎么把它放微信里面去 输错了一位数字怎么才能改过来? 苹果是别人的,现在用自己的手机号重新登陆,怎样删除以前的和数据? 前面有两个英文数字要怎么样才能把它删掉? 怎么设置全是数字?不要字母开头的,有些人是六位数字没字母 后面数字小点怎么整 怎样才能消除 怎样才能消除微信上的显示呢?怎么有的微信有显示,有的没有呢?怎样消除呢?谢谢 怎样消除 冬天温度低要用什么办法醒面 微信上面是名字,下面的,是数字让么删除? 怎样可以彻底删除数据? 微信直播间里前面的数字怎么去掉 中国一七年财政总收入是多少 今天我买了一部新苹果4S手机插卡不能识别卡,你们该怎么处理。 2016年全国财政总收入是多少 coloros恢复模式忘记密码怎么恢复出厂设置 高一历史 罗马法的作用与局限性 罗马法对罗马历史的发展与人类历史发展产生了哪些影响? 求真三国无双7猛将传的全武将MOV&ATK&LINKDATA0还原&视角修改 钱锁的寓意 用改进的欧拉公式求解初值问题y=y-2x/y 改进的欧拉公式是什么? 证明能用改进的欧拉方法精确求解初值问题y&#39;=ax+b,y(0)=0 扇子形状里面是算盘黄金吊坠的寓意?求解 根据改进欧拉公式算法框图编写程序,求初值问题y&#39;=x+y,y(0)=1的数值解,取步长h=0.2 生日钱锁的寓意 改进欧拉法的欧拉算法 关于改进欧拉法计算常微分方程,急! c语言编程 用欧拉法和改进欧拉法(欧拉预估校正法)分别编程!急求,马上交作业!!对图片上的题解答 分别用改进的欧拉法和四阶龙格-库塔公式求解微分方程初值问题 有什么办法可以使胶水不黏 高数题微分方程初值问题求解。题目如图,写出详细过程在纸上 求解 dx&#47;dy=y-2x&#47;y ,y(0)=1,0《x《1,用欧拉法,改进欧拉法,和R-K方法求整体阶段误差 用子函数表示欧拉法,改进的欧拉法以及解析解,最后用主函数输出结果 有什么办法让胶水不粘?