Questions tagged as 'java'

1
answer

childNodes I need to get the value of the child nodes

The reason for my question is that I need to know how to obtain the information that has the child nodes, since I am consuming a web service and at the moment mapping the xml does not map it as I wish since I want to have the data of the xml sep...
asked by 26.09.2017 / 21:19
1
answer

Error creating XML file with java

Hello everyone, I have the following program: import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * @author Montse */ @X...
asked by 27.09.2017 / 18:55
1
answer

HTML in JtextPane JAVA

I have a little doubt, how do I print a string inside a Text Panel with html tags? Example: jtextpane.setText("<html><body><font color=#16a085 size=6> Hola a todos! </font></body></html>"); @Dev...
asked by 07.10.2017 / 19:41
2
answers

"Unreachable statement" error when executing program

When compiling the following program in the cmd I get the error:    unreachable statement public class Ejercicio1{ public static void main(String[] args){ //A) int[] f = {10,2,4,5,4,3,8,9,2,3}; System.out.prin...
asked by 26.09.2017 / 21:30
1
answer

ObjectInputStream does not correctly display the object data

I want a program that reads a serialized file that contains the data of an object called "Comarca": on the one hand it has strings (comarq) and on the other ints (poblacio). The name of the file must be passed as a parameter (go, for the main ar...
asked by 26.09.2017 / 23:29
1
answer

setBackgroundresource in an ImageButton

I want to add a "gif" effect to an imageButton tiraDado.setBackgroundResource(R.drawable.dado); AnimationDrawable frameAnimation = (AnimationDrawable) tiraDado.getBackground(); frameAnimation.start(); tiraDado is an ImageButton T...
asked by 26.09.2017 / 18:49
2
answers

java 8 Lambda expression

Good, can someone explain in detail what makes this expression in particular? listModels.addAll(listaDao.stream().map(this::personEntityToPersonModel).collect(Collectors.toList())); I have the method: private PersonModel personEntityToPe...
asked by 11.10.2017 / 14:54
1
answer

error when opening the pdf itext

I am creating a digital signature with itext but when I open the pdf it tells me that the file is damaged: public void firmarPdf(String origen, String destino) { try { KeyStore keyStore = KeyStore.getInstance("JKS"...
asked by 12.10.2017 / 16:34
1
answer

Problem Exception in thread "main" java.lang.NullPointerException [duplicate]

If someone could explain to me and tell me how to solve it. I have two classes that I do not know why they do not communicate class 1: package practica003; import java.util.Scanner; public class PRACTICA003 { public static void main...
asked by 12.10.2017 / 00:45
1
answer

Problems with bicola in java, I want to insert data from both sides in a queue, but it does not work correctly

This is the problem I'm doing a bicola to insert data in both sides of the queue, but when I insert data to the left it does not work for me, instead putting data on the right side if it works. public class NodoCola { public int dato;...
asked by 31.10.2017 / 22:49