Questions tagged as 'java'

0
answers

Api Rest Client in Java

I am building a REST client according to the example link and I have two errors that I could not correct My Code: public void ClienteApiRest() { javax.ws.rs.client.Client client = ClientBuilder.newClient(); WebTarget targ...
asked by 28.11.2017 / 21:28
2
answers

How to access a method of a subclass from an ArrayList of the superclass?

I have the following code: public class SeleccionFutbol{ protected int carnetIdent; protected String nombre; protected String apellidos; protected int edad; public SeleccionFutbol(int id, String n, String a, int edad){ carnetIdent = id;...
asked by 29.11.2017 / 23:33
1
answer

I do not know what I'm failing with this Do While

Greetings people. I'm starting with Java and doing an exercise testing the do_while I do not know at what point I'm failing. The intention of the loop is that if the user enters a value lower than 1 or higher than 4, the program will ask the use...
asked by 29.11.2017 / 20:25
1
answer

How to SHOW a PDF brought from JAVA in HTML-JAVASCRIPT?

I need to SHOW a pdf that comes from JAVA. That's what I do with a servlet. function descargarCarta(){ console.log("entra a descargar"); var settings = { "async": true, "crossDomain": true, "url": "http://loc...
asked by 29.11.2017 / 21:35
1
answer

How to calculate the subtraction of an array filled by the user from the last number to the first?

Could you help me with a problem please: Create an arrangement of the size that the user decides, fill the arrangement with numbers entered by the user, then calculate the subtraction from the last number entered until the first package progra...
asked by 26.11.2017 / 03:41
2
answers

Program structure, how to relate these two classes

On the one hand I have the Subject class: public class Assignatura{ private int codi; private Assignatura seguent; public Assignatura(int c){ codi=c; seguent=null; } As you can see, the following attribute w...
asked by 10.12.2017 / 19:03
1
answer

How to restore a JFrame window

I have a% main% co which is minimized  with JFrame when another window is opened from the panels inside it. What I need is that when that other window that was opened the%% of main% is restored it will be restored but not maximized, si...
asked by 10.12.2017 / 20:09
0
answers

How can I make a league standings in Java?

I would like to know how to make a table of positions where the 2 teams to play is reflected in a table of points 3 winner 1 draw     
asked by 25.11.2017 / 19:57
0
answers

Modify objects within archives created with ObjetInputStream / ObjectOutputStream

Good morning, I have a problem when modifying objects inside files created with ObjectInput / ObjectOutput Stream, I have a file with user objects saved in a file called user.dat, to these objects type user with variable int points, I enter the...
asked by 26.11.2017 / 01:17
1
answer

How to get the value of a JComboBox?

I need to add to a vector the names that are chosen from several JComboBox, but I do not know how to do it. try it with these two methods:   // To get the name that is selected   public String getName1 () { guiID.getCBNombre1().addItemListen...
asked by 25.11.2017 / 21:07