真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

java課程表源代碼 java編程編寫簡單課程表

java課程設(shè)計(jì)源代碼(急!?。。。?/h2>

import java.awt.Color;

專注于為中小企業(yè)提供網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)晉城免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了成百上千家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。

import java.awt.Font;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.SwingConstants;

import javax.swing.border.LineBorder;

public class game21 extends JFrame {

private JLabel label_2;

private int number;

private int sum;

final JLabel label = new JLabel();

final JLabel label_1 = new JLabel();

public static void main(String[] args) {

new game21();

}

public game21() {

super("21點(diǎn)?!");

getContentPane().setLayout(null);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

final JButton button = new JButton();

button.addActionListener(new ActionListener() {

public void actionPerformed(final ActionEvent arg0) {

onClick();

}

});

button.setText("出牌");

button.setBounds(170, 350, 106, 28);

getContentPane().add(button);

label.setBorder(new LineBorder(Color.black, 1, false));

label.setHorizontalAlignment(SwingConstants.CENTER);

label.setFont(new Font("", Font.BOLD, 26));

label.setText("背面");

label.setBounds(158, 81, 137, 153);

getContentPane().add(label);

label_1.setText("你已經(jīng)擁有的牌:");

label_1.setBounds(109, 22, 270, 45);

getContentPane().add(label_1);

this.setBounds(200, 300, 501, 528);

this.setVisible(true);

getContentPane().add(getLabel_2());

}

public int randNumber() {

try {

Thread.sleep(10);

} catch (InterruptedException e) {

e.printStackTrace();

}

return (int) (Math.random() * 10 + 1);

}

public void onClick() {

number = this.randNumber();

this.sum += number;

label.setText("" + number);

String strTemp = this.label_1.getText();

strTemp += "" + number + " ";

label_1.setText(strTemp);

String temp = "合計(jì):" + sum;

label_2.setText(temp);

isWin();

}

public void isWin() {

if (sum 21) {

JOptionPane.showMessageDialog(this, "你輸了");

clear();

return;

} else if (sum == 21) {

JOptionPane.showMessageDialog(this, "你贏了");

clear();

return;

} else {

int i = JOptionPane.showOptionDialog(this, "是否繼續(xù)?", "提示",

JOptionPane.OK_CANCEL_OPTION,

JOptionPane.INFORMATION_MESSAGE, null, null, null);

if (i == JOptionPane.OK_OPTION) {

onClick();

} else

return;

}

}

private void clear() {

label_2.setText("合計(jì):");

sum = 0;

number = 0;

label_1.setText("你已經(jīng)擁有的牌:");

}

/**

* @return

*/

protected JLabel getLabel_2() {

if (label_2 == null) {

label_2 = new JLabel();

label_2.setText("合計(jì):");

label_2.setBounds(313, 35, 66, 18);

}

return label_2;

}

}

真好無聊中。。

親有java語言寫的超市管理系統(tǒng)課程設(shè)計(jì)和源代碼嗎,能給我嗎

package untitled5;

import java.io.*;

import java.net.*;

import java.sql.*;

import java.lang.*;

import javax.sql.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

public class delbook extends JFrame {

JPanel contentPane;

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel1 = new JLabel();

JLabel jLabel2 = new JLabel();

JLabel jLabel3 = new JLabel();

JTextField jTextField1 = new JTextField();

JLabel jLabel4 = new JLabel();

JTextField jTextField2 = new JTextField();

JLabel jLabel5 = new JLabel();

JTextField jTextField3 = new JTextField();

JLabel jLabel6 = new JLabel();

JTextField jTextField4 = new JTextField();

JButton jButton1 = new JButton();

//Construct the frame

public delbook() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系統(tǒng)");

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(500,400));

this.setTitle("超市管理系統(tǒng)");

jLabel2.setFont(new java.awt.Font("SansSerif", 0, 30));

jLabel2.setText("業(yè)務(wù)單位信息");

jLabel3.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel3.setText("產(chǎn)品編號(hào)");

jTextField1.setText("");

jLabel4.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel4.setText("公司名稱");

jTextField2.setText("");

jLabel5.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel5.setText("訂單號(hào)碼");

jTextField3.setText("");

jLabel6.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel6.setText("電 話");

jTextField4.setText("");

jButton1.setFont(new java.awt.Font("SansSerif", 0, 25));

jButton1.setText("提交");

jButton1.addActionListener(new delbook_jButton1_actionAdapter(this));

contentPane.add(jLabel1, new XYConstraints(179, 1, 153, 32));

contentPane.add(jLabel2, new XYConstraints(162, 33, -1, -1));

contentPane.add(jLabel3, new XYConstraints(83, 89, -1, -1));

contentPane.add(jTextField1, new XYConstraints(189, 88, 141, 36));

contentPane.add(jTextField2, new XYConstraints(189, 149, 142, 36));

contentPane.add(jLabel4, new XYConstraints(84, 148, -1, -1));

contentPane.add(jTextField3, new XYConstraints(188, 206, 143, 33));

contentPane.add(jLabel5, new XYConstraints(84, 204, -1, -1));

contentPane.add(jLabel6, new XYConstraints(84, 253, -1, -1));

contentPane.add(jTextField4, new XYConstraints(189, 260, 143, 36));

contentPane.add(jButton1, new XYConstraints(197, 318, -1, -1));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

void update() {

try {

//定義顯示的字符串

String str1;

String str2;

String str3;

String str4;

str1 = jTextField1.getText();

str2 = jTextField2.getText();

str3 = jTextField3.getText();

str4 = jTextField4.getText();

//裝載jdbc驅(qū)動(dòng)程序

String driverName = "oracle.jdbc.OracleDriver";

Driver driver = (Driver) Class.forName(driverName).newInstance();

//連接數(shù)據(jù)庫

Connection con = DriverManager.getConnection(

"jdbc:oracle:thin:@thsspc0791:1521:liuyong", "hr", "tongfang");

PreparedStatement pstmt = con.prepareStatement(

" insert Customer1('goodID','Name','PID','tel')values(?,?,?,?)");

pstmt.setString(1, str1);

pstmt.setString(2, str2);

pstmt.setString(1, str3);

pstmt.setString(4, str4);

ResultSet res = pstmt.executeQuery();

pstmt.close();

con.close();

}catch (InstantiationException e) {

System.out.println(e.getMessage());

}catch (IllegalAccessException e) {

System.out.println(e.getMessage());

}catch (ClassNotFoundException e) {

System.out.println(e.getMessage());

}catch (SQLException edd) {

edd.printStackTrace() ;

System.out.println(edd.getMessage());

}

}

void jButton1_actionPerformed(ActionEvent e) {

update();

}

}

class delbook_jButton1_actionAdapter implements java.awt.event.ActionListener {

delbook adaptee;

delbook_jButton1_actionAdapter(delbook adaptee) {

this.adaptee = adaptee;

}

public void actionPerformed(ActionEvent e) {

adaptee.jButton1_actionPerformed(e);

}

}

package untitled5;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

/**

* pTitle: /p

* pDescription: /p

* pCopyright: Copyright ? 2003/p

* pCompany: /p

* @author not attributable

* @version 1.0

*/

public class retur extends JFrame {

JPanel contentPane;

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel1 = new JLabel();

//Construct the frame

public retur() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系統(tǒng)");

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(400, 300));

this.setTitle("超市管理系統(tǒng)");

contentPane.add(jLabel1, new XYConstraints(139, 1, 126, 33));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

}

package untitled5;

import java.io.*;

import java.net.*;

import java.sql.*;

import java.lang.*;

import javax.sql.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

import com.borland.dbswing.*;

//貨品信息登記

public class Frame2 extends JFrame {

JPanel contentPane;

JLabel jLabel1 = new JLabel();

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel2 = new JLabel();

JLabel jLabel3 = new JLabel();

JTextField jTextField1 = new JTextField();

JLabel jLabel4 = new JLabel();

JTextField jTextField2 = new JTextField();

JPanel jPanel1 = new JPanel();

XYLayout xYLayout2 = new XYLayout();

JScrollPane jScrollPane1 = new JScrollPane();

JLabel jLabel5 = new JLabel();

JTextField jTextField3 = new JTextField();

//Construct the frame

public Frame2() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(600, 500));

this.setTitle("超市管理系統(tǒng)");

this.addHierarchyBoundsListener(new Frame2_this_hierarchyBoundsAdapter(this));

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系統(tǒng)");

contentPane.setForeground(Color.black);

jLabel2.setFont(new java.awt.Font("SansSerif", 0, 30));

jLabel2.setText("產(chǎn) 品 信 息 展 示");

// statusBar.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel3.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel3.setText("產(chǎn)品名稱");

jTextField1.setText("");

jLabel4.setEnabled(true);

jLabel4.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel4.setText("產(chǎn)品ID號(hào)");

jTextField2.setText("");

jTextField2.addActionListener(new Frame2_jTextField2_actionAdapter(this));

jPanel1.setLayout(xYLayout2);

jLabel5.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel5.setForeground(Color.red);

jLabel5.setText("該產(chǎn)品詳細(xì)信息");

jTextField3.setText("");

contentPane.add(jLabel1, new XYConstraints(237, 0, 153, 40));

contentPane.add(jLabel2, new XYConstraints(200, 47, 231, 58));

contentPane.add(jLabel3, new XYConstraints(47, 102, 101, 42));

contentPane.add(jTextField1, new XYConstraints(128, 108, 112, 34));

contentPane.add(jTextField2, new XYConstraints(361, 107, 109, 36));

contentPane.add(jPanel1, new XYConstraints(75, 166, 453, 277));

jPanel1.add(jScrollPane1, new XYConstraints(14, 8, 433, 221));

jScrollPane1.getViewport().add(jTextField3, null);

jPanel1.add(jLabel5, new XYConstraints(112, 240, -1, -1));

contentPane.add(jLabel4, new XYConstraints(278, 111, -1, -1));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

void Select() {

try {

String str1, str2;

str1 = jTextField1.getText();

str2 = jTextField2.getText();

用Java怎樣實(shí)現(xiàn)課表代碼?有周次

課表數(shù)據(jù)時(shí)存儲(chǔ)于數(shù)據(jù)庫中的嗎?

/**

* 獲取一周的時(shí)間集合(從周一到周日)

* @param weekNum ;-1:上周;0:本周;1:下周

*/

public static ListDate getWeekDates(int weekNum){

ListDate list = new ArrayListDate();

Calendar cal = Calendar.getInstance();

// 獲取指定下幾個(gè)星期

cal.add(Calendar.DAY_OF_WEEK, weekNum * 7);

cal.setFirstDayOfWeek(Calendar.MONDAY);

cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);

list.add(cal.getTime());

for(int i = 0;i 6;i++){

cal.add(Calendar.DAY_OF_WEEK, 1);

list.add(cal.getTime());

}

return list;

}

這個(gè)是獲取這一周時(shí)間的代碼 ,之后用下面的代碼獲取周一到周日的日期

ListDate ds = DateUtil.getNowWeekDates(weekNum);

ds.get(0)//周一

ds.get(6)//周日

用這兩個(gè)時(shí)間到數(shù)據(jù)庫中進(jìn)行范圍查詢,之后的你應(yīng)該明白了吧

java課程設(shè)計(jì)題目及代碼是什么?

java課程設(shè)計(jì)題目及代碼分別是:

1、題目:計(jì)算器。設(shè)計(jì)內(nèi)容是設(shè)計(jì)一個(gè)圖形界面(GUI)的計(jì)算器應(yīng)用程序,完成簡單的算術(shù)運(yùn)算。

設(shè)計(jì)要求是設(shè)計(jì)的計(jì)算器應(yīng)用程序可以完成家法、減法、乘法、除法和取余運(yùn)算。且有小數(shù)點(diǎn)、正負(fù)號(hào)、求倒數(shù)、退格和清零功能。

2、代碼:

數(shù)字按鈕NumberButton類如下:

import java.awt.

import java.awt.event.

import javax.swing.

public class NumberButton extends Button.

{

int number.

public NumberButton(int number).

{

super(""+number).

this.number=number.

setForeground(Color.blue).

}

public int getNumber().

{

return number;

}

}

其它java課程設(shè)計(jì)題目及代碼是:

題目:華容道。編寫一個(gè)按鈕的子類,使用該子類創(chuàng)建的對(duì)象代表華容道中的人物。通過焦點(diǎn)事件控制人物顏色,當(dāng)人物獲得焦點(diǎn)時(shí)顏色為藍(lán)色,當(dāng)失去焦點(diǎn)時(shí)顏色為灰色。

通過鍵盤事件和鼠標(biāo)事件來實(shí)現(xiàn)曹操、關(guān)羽等人物的移動(dòng)。當(dāng)人物上發(fā)生鼠標(biāo)事件或鍵盤事件時(shí),如果鼠標(biāo)指針的位置是在人物的下方(也就是組件的下半部分)或按下鍵盤的“↓“鍵,該人物向下移動(dòng)。向左、向右和向上的移動(dòng)原理類似。

代碼是:

String name[]={"曹操","關(guān)羽","張","劉","馬","許","兵","兵","兵","兵"}.

for(int i=0;iname.length;i++).

{

person[i]=new Person(i,name[i]).

person[i].addKeyListener(this).

person[i].addMouseListener(this).

//? ? ?person[i].addFocusListener(new Person).

add(person[i]).

}

person[0].setBounds(104,54,100,100).

person[1].setBounds(104,154,100,50).

person[2].setBounds(54,154,50,100).

person[3].setBounds(204,154,50,100).

person[4].setBounds(54,54,50,100).

person[5].setBounds(204,54,50,100);

person[6].setBounds(54,254,50,50);

person[7].setBounds(204,254,50,50);

person[8].setBounds(104,204,50,50);

person[9].setBounds(154,204,50,50);

請(qǐng)幫我用JAVA數(shù)組的方式編寫一個(gè)課程表,感激不盡!

public class IdUtil {

public static void main(String[] args) {

//七天的課程

String[] week = new String[7];

//每天的課程名

week[0] = "語文,語文,語文,語文,語文,語文,語文,語文,語文,語文";

week[1] = "數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué),數(shù)學(xué)";

week[2] = "外語,外語,外語,外語,外語,外語,外語,外語,外語,外語";

week[3] = "物理,物理,物理,物理,物理,物理,物理,寂寞學(xué),物理,物理";

week[4] = "化學(xué),化學(xué),化學(xué),化學(xué),化學(xué),化學(xué),化學(xué),化學(xué),化學(xué),化學(xué)";

week[5] = "生物,生物,生物,生物,生物,生物,生物,生物,生物,生物";

week[6] = "寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué),寂寞學(xué)";

//上課時(shí)間

String[] time = {"8:00","9:00","8:00","8:00","8:00","8:00","8:00","8:00","8:00","8:00"};

for(int a=1;a8;a++){

System.out.print("\t"+"星期"+a);

}

System.out.println();

int b = 0;

for(int i=1;i11;i++){

switch (i) {

case 1:

System.out.println("上午");

break;

case 5:

System.out.println("下午");

break;

case 9:

System.out.println("晚上");

break;

}

System.out.print(time[i-1]+"\t");

for(int j=0;j7;j++){

System.out.print(week[j].split(",")[b]+"\t");

}

System.out.println();

b++;

}

}

}

java編寫課程表Course

這個(gè)應(yīng)該不難吧,網(wǎng)上有很多實(shí)例,你找一個(gè),好好看一下邏輯,嘗試著編寫。


本文題目:java課程表源代碼 java編程編寫簡單課程表
標(biāo)題鏈接:http://weahome.cn/article/hgisgs.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部