The third column was a mistake :P
No, not all with the same format. Some are Label-Jbox ; some are Label-JTextBox .... Some are with imageicon.. That's why I needed the GridLayout
Type: Posts; User: Kerooker
The third column was a mistake :P
No, not all with the same format. Some are Label-Jbox ; some are Label-JTextBox .... Some are with imageicon.. That's why I needed the GridLayout
I got the part of the content pane! Thanks for that!!
About the FlowLayout, could you tell me how to make a linebreak on a FlowLayout? Because I need 15 lines of information, and making a...
I'm trying to set a maximum size in a JComboBox, but I can't do it.
I'm willing to do it so I can put the selecter next to a JLabel, but it's going into the second line, and not following the...
Hello Java Programming Forums community!
I'm a begginer in java, and have just finished my first 'big' project, but I did it with a lot of help, because I failed in some basics concepts of Java....
I made it the way I wanted.
I published the source code in [Java] 2014 cup timer by Kerooker - Pastebin.com
Thanks very much Norm for the help!
I don't know if you can do it, but you can now...
Couldn't find anything in this How to Set the Look and Feel (The Java™ Tutorials > Creating a GUI With JFC/Swing > Modifying the Look and Feel)
Any directions?
Could not find how to change the...
Working as expected!!
Now, finally, to change font, font colour, background image.... How can I change the frame's layout?
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
public class myTimer {
public static...
But if I leave the frame out of the timer method, I cannot call the values in the main method, as they're in different methods
Should I put the frame before the rest?
No error message, just not working.
I want the frame to be updated every second with the new information, so it can be counted down second to second.
I tried this
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
It's not possible, or else I would need to cal the label after the main method ended, and it's not possible to declare the Jframe before the timer...
I need a way to use a variable from the main...
label.setText(teste);
label cannot be resolved - line 24
I tried doing it:
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
No, the two calls are with the same name. The variable is named 'teste', and I tried to call 'teste', just copied the wrong name from the error, sorry.
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
public class myTimer {
public...
I can't, in that way label won't be resolved to a variable. (it's defined in other method...)
@@Edit
I tried putting all the JPane inside the main method, but that won't work either (no error...
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
public class myTimer {
public...
It won't get the value, it says that "teste" cannot be resolved to a variable
I tried
label.setText(teste);
But it won't work, I also tried label.setText (taskPerformed.getText);
But I 'knew' it wouldn't work... What's the value I need to get?
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;
public class myTimer {
public...
Should I create another file for it? Or isn't it possible?
Ah, alright.
I don't have any idea on how to start a GUI, have only been experimenting in Eclipse's IDE, never ran something expecting it to work... Would you send me a tutorial, or even some tips?
I made it work with this:
package cupTimer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.GregorianCalendar;
import javax.swing.* ;