Questions tagged as 'java'

1
answer

Back to other windows

I have the following: JButton btnSalir = new JButton("Volver"); btnSalir.setBounds(469, 674, 89, 23); btnSalir.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { Administra...
asked by 08.11.2017 / 01:17
1
answer

Enter an ArrayList into another

someone could help me solve a Java problem, import java.util.ArrayList; import java.util.Scanner; public class EliminarDato { static ArrayList<Paciente> pacientes = new ArrayList<Paciente>(); static ArrayList<En...
asked by 06.11.2017 / 21:17
1
answer

not supported on forward only result sets in Java

I am trying to fill a JTable with the records that a table has in my database in SQL. I receive this error:    com.microsoft.sqlserver.jdbc.SQLServerException: The requested   operation is not supported on forward only result sets. Sta...
asked by 07.11.2017 / 18:06
1
answer

How do I operate 2 values, both of different classes in a separate class in java? [closed]

good evening I want to know How to operate 2 values, both of different classes in a separate class in java? since I seek to operate (compare, add, subtract, divide, etc) two integer values entered by keyboard; I have these attributes converted i...
asked by 07.11.2017 / 18:44
1
answer

Read txt file and add it to two arrays in java

They ask me for a method where I have to load a txt file and add it to two arrays, one text and one double. I have the following code and I want to know how to add it to the methods, I already have an idea but I do not know if it's okay. Note...
asked by 03.11.2017 / 21:19
1
answer

Fill an input depending on the value of another

I have the following html form which has a readonly "Base Price" field and I want to fill it with a value that will depend on the data that the other inputs have and then validate it with Javascript and Java (JSP, Servlets) to save them in a dat...
asked by 04.11.2017 / 14:08
3
answers

Java, I have a problem creating a new instance of a class

Good first I have this class User package com.example.leaftime.rocketdefender; /** * Created by Leaftime on 04/11/2017. */ public class User { private Integer id; private String name; private Integer score; public User(Int...
asked by 06.11.2017 / 06:41
2
answers

Why is not subtraction applied to a variable?

Monton 1 should be worth 3 Result by console Program package Nim; import java.util.*; public class Nim { Scanner sc = new Scanner(System.in); private int monton1; private int monton2; private int monton3; public static int elegir;...
asked by 29.11.2017 / 18:01
1
answer

Error in a return

The return of the root method gives me an error and I do not know what it should be import java.util.Scanner; public class RaizCuadrada { private int numero; //CONSTRUCTORES public RaizCuadrada(){ System.out.println("Inroduce un numero:...
asked by 13.11.2017 / 18:42
1
answer

(Android) Initialize a view object in a Button and ImageButton

Good morning! I open this topic in case you can help me. It turns out that I have to create an object that inherits from View, but depending on a value it must be either a Button or an ImageButton. The problem is that I tried casting and dire...
asked by 13.11.2017 / 10:51