永发信息网

java怎么自动生成订单号

答案:3  悬赏:50  手机版
解决时间 2021-04-03 12:57
  • 提问者网友:遮云壑
  • 2021-04-02 21:27
java怎么自动生成订单号
最佳答案
  • 五星知识达人网友:第幾種人
  • 2021-04-02 22:28
获取当前时间根据时间生成
全部回答
  • 1楼网友:佘樂
  • 2021-04-03 00:20
可以引入uuid
  • 2楼网友:轻熟杀无赦
  • 2021-04-02 23:42
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
public class CopyContentToAnother extends JFrame implements ActionListener{
JButton button;
JTextArea jtx,jtx2;
Container c;
JPanel p;
public CopyContentToAnother(){
c=this.getContentPane();
p= new JPanel();
jtx = new JTextArea(12,12);
jtx2 = new JTextArea(12,12);
button = new JButton("确定");
button.addActionListener(this);
p.add(jtx);
p.add(jtx2);
p.add(button);
this.add(p);
this.setSize(500, 400);
this.setVisible(true);
}
public void actionPerformed(ActionEvent e) {
if(e.getSource() == button){
jtx2.setText(jtx.getText());
jtx.setText("");
}
}
public static void main(String args[]){
CopyContentToAnother m =new CopyContentToAnother();
}
}
上面已经回答了
编译已经通过,运行正确,如果还有问题,请留言ITjob
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯