Posts by Diogo Cipriano • 35 points
6 posts
-
-4
votes2
answers754
viewsQ: how to access the jbutton that is in the other class?
I got the jbutton in the main class, so I put him in the public room so I could access from another class. but you’re not doing the right thing public class piscarbt{ tela t = new tela(); public…
-
-1
votes1
answer62
viewsQ: How to call the same task more than 1 time
I have the following task: Timer tempovolta1 = new Timer(); TimerTask tarefavolta1 = new TimerTask() { @Override public void run() { jButton1.setBackground(Color.BLUE); } }; I want to call her…
-
2
votes1
answer65
viewsQ: error in comparison using substring
maquina += numeroale.nextInt(4); maquina += numeroale.nextInt(4); //vez da mqauina for (int i = 0; i < maquina.length(); i++) { System.out.println("valor atual"+maquina.substring(i,1));…
-
-5
votes1
answer317
viewsQ: How do I place the for every 1 second?
I managed to put the effect of clicking on the button but still put a click every second because it is going too fast package gênius; import java.applet.Applet; import java.applet.AudioClip; import…
-
-1
votes2
answers878
viewsQ: how to press the button using code, using the same effect as when the user presses
I’m making the game for java and when starting the machine will give a random sequence of clicks on 4 buttons and then the user has to press the same machine, but I do not know how to make the…
-
2
votes1
answer463
viewsQ: how to put sound effect when clicking the button
I made the button <ImageButton android:layout_width="178dp" android:layout_height="150dp" android:onClick="clickMyamarela" android:id="@+id/button1" android:src="@drawable/botao_amarelo"…
androidasked Diogo Cipriano 35