Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~157 People Reached
Favorite Forums
Favorite Tags
java x 1
Member Avatar for csl

how do i create new JLabel() dynamically in a while loop, and add to a JPanel by using the setBounds method. The setBounds work, however, there are other JLabel added to other place. why is this happen? [code]while(condition){ pin = new JLabel(); pin.setIcon(pinIcon); pin.setBounds(Panel1.getImgX(), Panel1.getImgY(), 20, 30); Panel1.panel.add(pin); }[/code]

Member Avatar for mKorbel
0
157