Questions tagged as 'java'

1
answer

How to make an event by pressing two keys?

I'm doing a program where I want to include keyboard shortcuts. The program in question has a series of jTextFields that I want to fill directly with the keyboard without having to be jumping from field to field, and I also want to be able to do...
asked by 15.10.2017 / 12:10
1
answer

Problem showing the total

who can tell me why he does not show me the total (calculated), I have already called the setCalcular method but the total he shows is 0 Customers Class private String nombre = "", apellido = "", placa = ""; public String clientet = "", ve...
asked by 16.10.2017 / 00:45
1
answer

How can I write to a file with multiple lines in java?

I have a method that generates 10,000 numbers and I store them in an array. I would like these data to be written in a file of 10 lines with 1000 numbers per line. This is what I have tried: try { File f = new File(System.getProp...
asked by 16.10.2017 / 00:13
1
answer

Why does not the variable sumaserie solve me?

package org.ip.sesion04; public class SumaSerie { public static double sumaSerie(int i) { double SumaSerie = i/(i+1); return SumaSerie; } public static void main(String[] args) { // TODO Auto-generated met...
asked by 24.10.2017 / 09:44
1
answer

Error with fix in abstract class (Client is abstract; can not be instantiated)

I have an abstract class called Client with two subclasses. In the main file (called TestClient) I need to make an array but when I try to start it it gives me the message "Client is abstract; can not be instantiated". // Arreglo de client...
asked by 24.10.2017 / 09:39
1
answer

How to call the value of a jComboBox?

I do the following query to add elements to the comboBox: cmbCargo.setModel(obj.LlenarCombobox("costo", "SELECT * FROM tipoServicio")); (The first value is the field that is shown in the query) Using this method public...
asked by 31.08.2017 / 00:59
1
answer

How to read processed view jsp in spring?

Is there a way to get a view as String already processed? I need to send emails and I want to avoid creating the html views in a String and better create a JSP view and be able to call it as a String . I've dealt with...
asked by 30.08.2017 / 23:36
3
answers

adding variables from a Java array

I have an arrangement with 12 elements, each one is a month of the year and they are assigned a number of days respectively int Enero=31; int Febrero=28; int diciembre=31; int cantidades[]= {Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agost...
asked by 04.09.2017 / 06:02
1
answer

Show Name Java Jframe

I have a query. I have the following java code and I want the button to greet me to capture the name that the user types and when I click on the button, I will show it to me in the Jframe. import java.awt.event.ActionEvent; import java.awt.eve...
asked by 04.09.2017 / 13:04
1
answer

Help with Sockets in Play [closed]

I have a game implemented in java, to roll a dice and to pass the points and if 1 points are left at zero and if the turn passes the points are saved and the one that reaches 100 wins now I have only two frames but what happens is that I do not...
asked by 03.11.2017 / 03:15