Questions tagged as 'java'

1
answer

Java: how to pause within actionPerformed

Good morning / afternoon / evening, lately I have had problems finding a solution for my problem what I try to do is pause a java program, this I used to do in C with sleep (milliseconds); and it worked as I wanted since the waiting time was d...
asked by 09.09.2017 / 05:47
2
answers

Spiral matrix does not work Java

This is the code I did to go through the spiral matrix, but it goes through the matrix in a different way 2000021 1970022 1860123 1714131224 1600025 public class caracol { public static void main(String[] args) { int[][] matriz...
asked by 09.09.2017 / 02:55
1
answer

How to send print to a printer that is not set as default?

Hello, I am creating a java application in which I send graphics to a printer. The problem I have is that if I do not put the printer as the default in windows, it does not send print to that printer. I've seen that the name is sent to print...
asked by 21.08.2017 / 18:53
1
answer

Problem NaN error or infinity error

Hi, I have a problem with a textfield when I try to show the result of a calculation. I tried converting it to String and everything but it says NaN error or infinity error. I better show you some images to help me. the first image shows the jfr...
asked by 27.09.2017 / 21:33
4
answers

how do I generate objects with a java loop?

public static void main(String[] args) { Scanner teclado = new Scanner(System.in); System.out.println("Introduzca el numero deseado de objetos: "); int n = teclado.nextInt(); String vector[] = new String[n]; for (int i = 0;...
asked by 28.08.2017 / 07:46
2
answers

Error creating objects

Good evening, I was commissioned to carry out a simple program in the POO class in which it consists of doing a simple program in which it consists of a Bank where you can enter or withdraw money. I did it in 2 classes, but in the second class i...
asked by 27.08.2017 / 05:31
1
answer

Navigate array accessing attributes of child classes

I have an array of type Relacion , which is filled with objects of type Binario . Binario inherits Relacion . How can I get the values of the attributes of binary objects? Relacion exprs[] = { new Binario(Operador...
asked by 26.08.2017 / 02:45
1
answer

How to "jump" loops with the debugger, intelliJ, Java

Well, my question is how can I make a for loop run whole without having to press the F7 key all the time. I want it for a for that I print a matrix that is changing, and of course, if I go with the F7 I shot three years. I mean, I do not know...
asked by 17.12.2017 / 12:38
1
answer

Combine two Json objects in java

I have two JSONObjects with the same structure, but I want to combine them so that the characteristics are kept in common and that those that are different give priority to the second object. Example: JSONObject obj1 = new JSONObject("{ "na...
asked by 15.12.2017 / 22:32
1
answer

How to store string type data in a java array

Good People I need help, I am working on a project with forms, the program is already done, it is about a questionnaire in which it presents a question (jlabel) and the user chooses one of the options shown by (radiobutton), until the system hit...
asked by 13.08.2017 / 23:44