editer un label java

Solutions on MaxInterview for editer un label java by the best coders in the world

showing results for - "editer un label java"
Alexander
05 Jun 2017
1public class inter extends JFrame implements ActionListener{
2		JTextField j;
3		JButton b;
4		JLabel l;
5		public inter(){
6			l=new JLabel("the worst area");
7			b=new JButton("changer");
8			b.addActionListener(this);
9			j=new JTextField(20);			
10			j.setVisible(true);
11			this.setLayout(new FlowLayout());
12			this.add(l);
13			this.add(j);
14			this.add(b);
15			l=new JLabel("the worst area");
16			this.setTitle("diagnostic");
17			this.setSize(300, 300);
18			this.setVisible(true);
19		}
20		@Override
21		public void actionPerformed(ActionEvent e) {
22			// TODO Auto-generated method stub
23			if (e.getSource()==b){
24				this.l.setText(j.getText());
25			}
26 
27		}
28 
29 
30}
queries leading to this page
modifier label javaediter un label java