1.用JAVA 设计一个程序,窗口中包含2个文本框,2个标签和3个按钮控件。

* 当用户在输入文本框中输入一些字母(小写、大写或大小写混合)后单击“大写”按钮,
* 可在输出文本框中输出大写转换结果,单击“小写”按钮可得到小写转换结果,
* 单击“退出”按钮结束程序运行。

第1个回答  2016-05-15
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string s = label1.Text;
s = label2.Text;
label2.Text = label1.Text;
label1.Text = s;

string a = textBox1.Text;
a = textBox2.Text;
textBox2.Text = textBox1.Text;
textBox1.Text = a;

}

}
}本回答被网友采纳
相似回答