Questions tagged as 'java'

1
answer

How to prepare a Java object to be sent (with values)?

I have to send a serialized Java object, I already have this method that receives an object and sends, my question is how to set the values in the object, my data is in the database, submit? I've never done that, so I have this doubt.     
asked by 10.08.2015 / 15:17
1
answer

How to inform downloadable PDF file name using IText / Lowagie and Primefaces?

I am able to download the generated file, but I can not name it or .pdf, only download as index.xhtml . Does anyone know how to handle this? I call the method to generate the PDF like this: <h:body> <h:form>...
asked by 08.08.2015 / 22:12
1
answer

Socket does not send message to correct clients

When typed /msg nome mensagem should send this message to nome , but he will send it to whoever typed Manager.java private Socket cliente; public static String nomeCliente; private static BufferedReader leitor; private static P...
asked by 04.08.2015 / 02:49
1
answer

Always focus on JFrame

I need when I click on any button in my application the focus will return to JFrame . Is there any method for this? I could call the MeuFrame.requestFocus() method on every ActionPerformed , but this would take a long time....
asked by 13.07.2015 / 20:24
1
answer

Crawler to log in to the São Paulo tax note site

What I have so far is this: package br.com.crawler; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class Crawler {...
asked by 02.07.2015 / 17:04
1
answer

How to use "drawRect" to draw on a component?

I'm learning Graphics , but I can not make a square: public static void main(String[] args) { JFrame tela = new JFrame("Snake"); tela.setSize(500, 500); tela.setVisible(true); Graphics g = tela.getGraphics();...
asked by 03.09.2015 / 16:40
2
answers

How to remove the border of text in a component?

I have a program in Java and would like to remove these borders that appear in the button text: (The red borders were in the edition the ones I want to remove are those dark blue inside the red ones)     
asked by 02.09.2015 / 22:57
1
answer

NullPointer Exception Error When Bringing Fragment Data

I'm having a NullPointerException error while trying to return the data from a Fragment. The NPE error is fine in this line: String comentarioFoto = fragment_obj.campoComentarioFoto.getText().toString(); See my activity code: public class...
asked by 23.06.2015 / 16:26
1
answer

ListView of the Android database - Close app with error

I'm implementing a SQLite3 registry on Android and so far so good, the problem is in calling Activity of data listing when the registration is successful, when calling Activity the application is closed with error. Follow the co...
asked by 19.06.2015 / 19:08
1
answer

CPF String Error Android

Does anyone have a CPF code for validation on Android? I have the following code: public static boolean validateNotNull(View pView, String pMessage) { if (pView instanceof EditText) { EditText edText = (EditText) pView; Edi...
asked by 19.06.2015 / 15:32