No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
Re: java is good if you are still a begginner | |
how do I make a pictur move?.code: public class picture extends JFrame{ private static final long serialVersionUID = 1L; JLabel ball; int h = 100; int l = 200; public picture() { System.out.println("working"); Icon bb = new ImageIcon(getClass().getResource("ball.jpg")); ball = new JLabel(bb); ball.setBounds(10, 10, h, l); ball.addKeyListener(new KeyListener() { public … | |
how do i change the background to a custom one. code JButton button = new JButton(); JButton quit = new JButton(); public Mainmenu() { Icon b = new ImageIcon(getClass().getResource("play.jpg")); play = new JButton(playb); add(button,BorderLayout.CENTER); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit,BorderLayout.SOUTH); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent … | |
please help me how to close the window. code: JButton quit = new JButton(); public Mainmenu() { setLayout(new FlowLayout()); Icon quitb = new ImageIcon(getClass().getResource("quit.jpg")); quit = new JButton(quitb); add(quit); quit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { } }); | |
i need good java eclipse tutorial iv'e watched theCherno,Thenewboston etc.i learned GUI,anonymousclass etc.i just need a good beginner tutorial on java eclipse. | |
please someone tell me how to change the size of the button.the code: JButton button1 = new JButton(); JButton button1 = new JButton(); public Mainmenu() { setLayout(new FlowLayout(100,278,158)); Icon button2= new ImageIcon(getClass().getResource("button1.jpg")); button2=new JButton(button2); add(button); Icon button2= new ImageIcon(getClass().getResource("button2.jpg")); button2=new JButton(button2); add(button2); HandlerC hand = new HandlerC(); button1.addActionListener(hand); button2.addActionListener(hand); } … | |
I created a button but I don't know the line of code to change the position of the button. | |
i'm testing a metdhod that is filled with how the window is going to be like.I use assertequals but i don't know what to type in the expected. |
The End.