Questions tagged as 'java'

2
answers

How to display a .txt file in a JtextArea automatically

I'm tired of searching and can not find how to display a .txt file in a JTextArea automatically. I made a program that opens a window and then wanted it to display the contents of that file without having to load it into a button.     
asked by 07.11.2014 / 23:10
1
answer

Problem retrieving DataSource in Wildfly: javax.naming.NameNotFoundException

I'm trying to establish a connection using DataSource, and it's returning the following error: Feb 08, 2016 8:15:03 PM org.xnio.Xnio <clinit> INFO: XNIO version 3.2.2.Final Feb 08, 2016 8:15:03 PM org.xnio.nio.NioXnio <clinit> INFO...
asked by 08.02.2016 / 23:21
3
answers

What is an object returned in parentheses?

} return (carro); } Does it have any behavior other than the unmasked object? I was in doubt, apparently the code works normally.     
asked by 11.06.2015 / 23:39
2
answers

Doubt about web application chat with Java and PrimeFaces

Well, I'd like to ask a question. I have to make some kind of chat where people can talk to each other. It will work just like a chat of Facebook or WhatsApp for example, but I do not have any database or reference that I can s...
asked by 24.06.2015 / 19:15
3
answers

Convert date with timezone

new Date () in javascript returns me this format:    Tue Apr 01 2014 13:43:13 GMT-0300 (BRT) I need to convert this to a java.util.Date. For this I am trying to use SimpleDateFormat () but I did not find a pattern that worked, it always r...
asked by 01.04.2014 / 18:51
1
answer

Using BASE64 in Java

Problem: I can not import the classes BASE64Decoder and BASE64Encoder , there are N code that use them and when I use them everything that is related does not work just because they are not found. import sun.misc.BASE64Deco...
asked by 27.02.2014 / 16:25
2
answers

Open Source CAPTCHA decoder

I'm looking for some CAPTCHA decoding API, one that is freely usable and open source. I understand that this is a complex process that uses OCR scans and advanced techniques for digital image analysis and processing, but I still think it's so...
asked by 05.02.2014 / 19:54
1
answer

How to implement a graph using amCharts?

I'm trying to implement a bar / column chart using the own tool from amCharts that uses XML but not I'm able to edit it to stick with a specific bar. What would be the simplest solution for implementation using amCharts?     
asked by 10.02.2014 / 13:46
1
answer

How to override equals method?

I'm trying to override the equals method for instead of validating if an integer object is equal to the other just checking if a value in this object is the same as the other. Real Scenery: Object Student being him. name and rg, and age if...
asked by 12.04.2016 / 21:06
1
answer

MessageDigest class and hash with MD5 in java

I'm testing the creation of Hash using this class, and I've seen it on many sites, including SOEn , the use of excerpts similar to the following to create hashs using md5, but without much explanation of the operation (in Portuguese, at least):...
asked by 03.03.2016 / 15:28