Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

i can't use label in JFrame to display string in another class

$
0
0
who knows ? why i can't use label in JFrame to display string in another java file ?

first file java class (class1):

String [] a = new String(2);
a[0]="ZZz";

second file java class(JFrame) :

i use label. its variabel name is label1
class1 b = new class1();
label.setText(b.a[0]);

when i run my JFrame, the label is blank display. please help.. thanks

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>