Questions tagged as 'java'

1
answer

Special character error in Java

I have a problem here and I did not find anything to solve on the internet, if you could help me, I would be extremely grateful. Well, come on, I have a web application in java that I use Spring Boot + JSP. The problem is this: I have two app...
asked by 31.07.2017 / 19:18
1
answer

My doubly chained list is not sorting

No Double Class package ListaDuplamenteEncadeada; public class NoDuplo { private Integer elemento; private NoDuplo anterior; private NoDuplo proximo; public NoDuplo(Integer elemento, NoDuplo anterior, NoDuplo proximo) {...
asked by 29.07.2017 / 16:56
1
answer

Buttons do not display correctly

I'm trying to add 2 JButtons to a program, I make the whole process to add, but it shows only one. package ldegraphic; import java.awt.Graphics; import javax.swing.*; public class LDEGraphic extends JFrame { JButton jb = new JButton("Adic...
asked by 21.10.2017 / 16:38
2
answers

Return all birthdays of the month chosen by the user

I am developing a system of a friends' calendar. Some classes were created: Endereço , Amigo , GerenciarAmigo . When I put the system to run, it does not show me the String of the birthday names of that month, but onl...
asked by 17.05.2017 / 01:37
1
answer

Error in the comparison between an EditText and a String

I'm trying to compare the text entered in an EditText with an item in my ArrayList, but the condition is never true. int aux=-1; for (int i = 0; i < lista2.size(); i++) { if (edContato.getText().equals(lista2.get(i))){ aux = i;...
asked by 06.05.2017 / 23:19
1
answer

Method being called several times in the change event of a p: ajax

I have a table with a p:inputText with a p:ajax inside, it has the change event, when I fill that inputText with a value a query and some validations are performed. The problem is that when I put a value inside that...
asked by 10.05.2017 / 17:00
1
answer

How to hide and block the last line of a JTable?

Is it possible to hide and block the last line of a DefaulTableModel ? I have this difficulty and I can not solve it. If not, is it possible to hide this line? import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swin...
asked by 05.10.2017 / 16:02
2
answers

When I put the \\ b in the pattern.compiler it returns the find as false

When I put \ b in pattern.compiler it returns matcher.find as false, because it can not find a pattern just because of \ b. Following the code I use: final Pattern py = Pattern.compile("\b(print|True|False|int|str|float|bool)\...
asked by 06.10.2017 / 14:25
2
answers

Prevent classes from modifying the state of objects

How to prevent classes from modifying the state of objects in a class, both Within equal and separate packages? Assuming there is a pattern for designing a java class design that may or may not affect the state of objects.     
asked by 30.03.2017 / 23:41
1
answer

What is the difference between a state (referring to the State Machine) and a class?

I would like to know how to differentiate a state, an interface of a class, what are its main differences? How can I distinguish them?     
asked by 05.04.2017 / 18:46