Questions tagged as 'java'

2
answers

How to hide the keyboard when clicking on an EditText?

I have following XML: <android.support.design.widget.TextInputLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginRight="15dp" android:layout_we...
asked by 26.05.2017 / 20:14
1
answer

Lock the enter key inside the p: editor

I'm using java, JPA and PrimeFaces with Wildfly. I have one of the PrimeFaces that I want to block when the user hit the enter key there is no action. How should I proceed?     
asked by 25.05.2017 / 15:17
2
answers

DataTable data is not displayed, even with loading of ArrayList being executed correctly

I'm loading a JSF dataTable with an ArrayList, but the result is not displayed at all, here's my code: index.xhtml                <h:body> <h1>Novo Jogo</h1> <j:form> <fieldset> <leg...
asked by 30.04.2017 / 18:44
2
answers

Use foreign key as primary key - Hibernate

I'm implementing hibernate in my project and I've reached a stage when I'm having trouble mapping my entities. I have an entity called Book and would like to create an Inventory entity to store the number of books I have, however, I would lik...
asked by 05.03.2017 / 20:40
1
answer

Error sending E-mail using Hotmail as CommonsMail Java

I'm having trouble sending email using Outlook, returning the following error. Erro Sending the email to the following server failed: smtp.live.com:25 I have tried with port 587 and smtp smtp-mail.outlook.com , but with no succ...
asked by 24.02.2017 / 14:41
2
answers

Stream Manipulation (Java 8)

Hi, I have a String Stream with many lines of a txt, I need to do a split to break the lines in the pipes, but the return as you know is a String vector, to know if this is possible: Stream<String> linhas=Files.lines(caminho,StandardChar...
asked by 02.03.2017 / 15:51
1
answer

IF condition within an Oracle SELECT [duplicate]

There are other questions in this context, but I am lazy on the subject and I do not understand. With this, I need help. I have SELECT for searching data in a ORACLE database, however I need to make a IF condition withi...
asked by 28.02.2017 / 22:25
1
answer

Capturing action of certain buttons in a JFrame

I created a JFrame that, when clicking the keyboard buttons: up, down, left and right, a certain action should take place (a Joption in the case). For this I am using a KeyListener , but unfortunately I click on certain buttons a...
asked by 20.06.2017 / 00:46
2
answers

Accessing SQLite database in another activity

I'm starting out in java android, I'm quite lay still, I'm catching the POO concept little by little. My problem is as follows, I have a class BankBank and another BankController where I have some methods to manipulate the bank, this in an ac...
asked by 22.06.2017 / 22:20
1
answer

How can I move an element of an ArrayList to the last element?

I wonder if there is any method to perform the operation, without being manually concatenated. Example of what you intended: [1,2,3,4] - > [1,3,4,2]     
asked by 14.04.2017 / 11:31