Questions tagged as 'java'

1
answer

How to traverse a vector with the quantity of the second vector?

int[] teste1 = {3524, 79, 2573, -4216, -4126, -4169, 1876, 2903, 2702, 1090, -6544, -8600}; int[] teste2 = {3524, 79, 2573, -4216, -4126, -4169}; I have a vector with 12 records and another with 6, I need to go twice without repeating. Exa...
asked by 18.05.2015 / 21:45
1
answer

Calling a method inside a class

I have this part of my code where I call a class to add '0' to a group of characters that must have 4 characters. StringTokenizer frase = new StringTokenizer(IMEIstring,"."); String first = frase.nextToken(); if(first.length()<4){ AddOh...
asked by 20.05.2015 / 20:50
1
answer

Refresh dialog form without closing it

How can I do to update my form dialog without closing it? In other words, I need to get the address by the zip code, and I'll throw it on the form, but I can not. Here is the code I'm using.: View: customer registration <?xml v...
asked by 21.05.2015 / 19:46
1
answer

Why is my variable null?

I'm translating a function from Java to JS, the logic remains the same but the results are different. On regular expression test , returns match when testo 40kb but when compiling the code gets a null on an unspecified line. Why whe...
asked by 27.04.2015 / 14:52
1
answer

Difference between Merge () and getInstace () in JPA / Hibernate

I would like to know when to use merge() to update the object instead of changing it through your reference. Example: Produto p = new Produto(); p.setNome("Bola"); p.setvalor("32); manager.persist(p); manager.getTransation().begin();...
asked by 24.04.2015 / 19:04
1
answer

Angular.js $ setValidity onLoad Page

Scenery: I have a form with 3 steps, a jsp for each step. In a given jsp there is a input text with the directive ng-minlength and a onChange that calls a function that validates with $setValidity if the value...
asked by 05.05.2015 / 15:27
1
answer

How to center the text in a JTextArea or JTextPane

In this image the text is not centered, it is much higher than JTextArea : And I would also like the text to start in the middle of JTextArea and adjust as I write. What method can I use to fix this?     
asked by 01.08.2015 / 05:45
1
answer

Error when cleaning and constructing: "uses unchecked or unsafe operations."

Next, I have a "Tray" class in my project which at the time of Clean and Build is displaying the following error: "Trap.java uses unchecked or unsafe operations." I gave one a search and at first it would be a problem to use Generic ArrayList...
asked by 02.05.2015 / 01:30
1
answer

Implement parent class

Well, I researched a lot, I even know how it works, but I could not implement it, I would like a light. I have the classes House and Building, I need to create a parent class Imovel, taking House and Building as daughter classes, follow my code:...
asked by 24.05.2015 / 07:11
1
answer

help on how to remove a particular string

test content.txt <td><input type="radio" name="pg1" value="SIM" /></td> <td><input type="radio" name="pg1" value="NÃO" /></td> <td><input type="radio" name="pg2" value="SIM" /></td> <t...
asked by 25.05.2015 / 02:55