Reputation: 121
im using windows 8 and java 1.8.0_25. This might sound a little noobish but, i made a jlabel called OS (the variable name is OS). The text of the jlabel is originally -
i also have a button which sets the text of the jlabel to OS name when clicked.
Here is my code:
OS.setText(System.getProperty("os.name", "cannot find os name"));
After i run it and click the button, the - turns into a ... ( 3 dots), it doesnt return "cannot find os name" or the os im using (windows 8). It doesnt give any compiler errors or anything like that, its just not working.
Can someone tell why?
Upvotes: 0
Views: 492