Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dein Code
- ...
- f.enemy_intL.setBounds((int)f.screensize.getWidth() / 2 - 425, (int)f.screensize.getHeight() / 2 - 340, 500, 35);
- f.enemy_intL.setVisible(false);
- f.enemy_intL.setFont(font);
- f.enemy_intL.setForeground(Color.WHITE);
- f.survival_time_Label.setBounds((int)f.screensize.getWidth() / 2 - 425, (int)f.screensize.getHeight() / 2 + 325, 500, 35);
- f.survival_time_Label.setVisible(false);
- f.survival_time_Label.setFont(font);
- f.survival_time_Label.setForeground(Color.WHITE);
- ...
- //Besser:
- ...
- setStandardLook(f.enemy_intL,425,340,500,35);
- setStandardLook(f.survival_time_Label,425,325,500,35);
- ...
- private void setStandardLook(JLabel jl,int offsetx,int offsety,int width,int height){
- jl.setBounds((int)f.screensize.getWidth() / 2 -offsetx, (int)f.screensize.getHeight() / 2 + offsety, width, height);
- jl.setVisible(false);
- jl.setFont(font);
- jl.setForeground(Color.WHITE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement