Questions tagged as 'java'

1
answer

Report generation error JasperReport + Netbeans net.sf.jasperreports.engine.JRException: java.net.MalformedURLException

I'm trying to generate a report by doing only the design in ireport, then I put the .jrxml in netbeans and I try to compile it, then at the time of getting the report path it throws the following exceptions: javax.faces.FacesException: #{rela...
asked by 04.06.2015 / 15:01
2
answers

Error fetching Time and Date

I am registering in the MySQL database values such as time and date. Code JAVA : public String getDataPedido() { StringBuilder horaSistema = new StringBuilder(); GregorianCalendar pegarHora = new GregorianCalendar(); hor...
asked by 03.06.2015 / 17:09
1
answer

setPreferredSize and setSize do not work

I've used setPreferredSize and setSize on the color1 button but no effect in the application, it continues using the entire application. public static void janelaPrincipal() { //FRAME JFrame janela = new JFrame();...
asked by 18.07.2015 / 07:51
1
answer

Change script variable value via Java application

I created a script where within this script there is a loop of type while . The condition of this while is escolha != 1 . Everything works ok, but in the middle of this while I run a Java application where I make some...
asked by 18.07.2015 / 08:12
1
answer

Content of one matrix receive the other

Parent Matrix: public static String [][] matrizPrincipal(){ String [] [] matriz = new String [2] [6]; matriz[0][0] = "Robin Arryn"; matriz[0][1] = "Lino Facioli"; matriz[0][2] = "145"; matriz[0][3] =...
asked by 17.05.2015 / 00:18
1
answer

How to receive a value and store it in the position indicated by the user in an arrays array?

I did as follows: int matriz[][] = new int[numLinhas][numColunas]; //FOR PARA RECEBER OS VALORES E POSIÇÕES INFORMADAS PELO USUÁRIO for(int x=0; x<numLinhas; x++) { valor = Integer.parseInt(JOptionPane.showInputDialog("Info...
asked by 20.05.2015 / 05:59
1
answer

Create new array with contents from another array

Parent Matrix: public static String [][] matrizPrincipal(){ String [] [] matriz = new String [2] [6]; matriz[0][0] = "Robin Arryn"; matriz[0][1] = "Lino Facioli"; matriz[0][2] = "145"; matriz[0][3] = "Vivo"; matri...
asked by 21.05.2015 / 22:14
1
answer

Doubt regarding the for function

for(int i=0; i<mat.length; i++){ for(int j=0; j<matrizFemininaArryn.length; j++){ if(mat[i][5].equals("Feminino") && mat[i][4].equals("Arryn")) matrizFemininaArryn[j] = mat[i][0]; } } In t...
asked by 17.05.2015 / 22:26
1
answer

How to configure a project with JUnit to be able to construct correctly inject the EntityManager?

I have a legacy JSF / Demoiselle 2.4 application that did not have the good practice of building unit tests. In order to satisfy new requirements, I have implementations to make and I intend to build them using TDD. However, when writing my f...
asked by 04.05.2015 / 14:21
1
answer

Insert hyphen ("dash" -) automatically as user type

Is there any way for as long as the user types in a EditText go by inserting hyphen (-) every 4 characters typed? In the same way some licenses work, the dash (-) is already inserted automatically.     
asked by 04.05.2015 / 21:55