Posts by Dener • 813 points
23 posts
-
5
votes1
answer415
viewsQ: Temporary variable performance within loop
During college a professor commented with me that declare a variable before a loop and reuse it was an economic and more interesting way to do it. For example (in Java): String str; for(Pessoa p :…
-
2
votes1
answer933
viewsA: Horizontal scrollview of a Textview automatically slide when inserting dynamic texts
Try to do so: ScrollView sc = ((ScrollView) R.findViewById(R.id.scroll); sc.post(new Runnable() { public void run() { sc.fullScroll(ScrollView.FOCUS_DOWN); } });…
-
1
votes3
answers1558
viewsA: Jcombobox update from another Jcombobox
You can use a listener in the first Combobox to change the content of the second. Something like this: private void configuraComboBox(){ List<String> meses =…
-
4
votes1
answer114
viewsA: avoid stackoverflow while reading and popular relationships
Luiz The cause of StackOverflow is the bidirectional relationship between classes Book and Author. When you create a author and tries to give values to the attributes, a List<Book>, and each…
-
2
votes3
answers1552
viewsA: How to set index when inserting item in Jcombobox?
André, if you are using a model in his JComboBox that implements the interface MutableComboBoxModel you’ll manage to make: ((MutableComboBoxModel) jComboBox.getModel()).insertElementAt(carlos, 0);…
-
7
votes1
answer239
viewsQ: What is the difference between method annotation and attribute annotation
Guys, I started learning and using the hibernate recently, and while searching for answers to my questions regarding the annotations I have come across following occasions: 1st) The attribute has…
-
0
votes1
answer140
viewsA: Custom jcheckbox does not appear
Daniel, I suppose you’re adding your checkbox with a jPanel.add(aCheckBox); and its panel panel features a layout livre. Thus the layout of your jPainel don’t know where to add your component…
-
3
votes2
answers215
viewsA: Graphics in Primefaces
Try something like that with Map, this way will have the amount for each employee of tasks paused and finalized: Map<Funcionario, Integer> tarefasPausadas = new HashMap<Funcionario,…
-
1
votes1
answer350
viewsA: Display an alert when the event is 5 minutes away
Techies You can use a Timer (java.util.Timer) and schedule it to run 5 minutes before your time: private Timer timer; private void programaPara(Date data){// mande a data com 5 minutos de…
-
3
votes2
answers357
viewsA: How to hide title from Jtabbedpane tabs?
Skywalker I don’t know if there’s such a thing setTabVisible(boolean b). But you can use the JTabbedPane setTabComponentAt: jTabbedPane1.setTabComponentAt(int index, Component c); You must do for…
-
2
votes2
answers124
viewsA: How to work with converted dates
wladyband The error that occurs is in this part here: DateTime entrada = new DateTime(dataStringInicio); //<--mandou uma string DateTime audiencia = new DateTime(dataStringFinal); //<--mandou…
-
2
votes1
answer243
viewsA: Problems with changing Jpanel inside Jdialog using Swing
Daniel According to the documentation (I didn’t find the article) component cannot be being displayed in two places at the same time. Each GUI Component can be contained only Once. If a Component is…
-
1
votes1
answer933
viewsA: Always focus on Jframe
There is yes, try: You tell your jButton transfer focus and ask for your jFrame solicit this focus. jButton.transferFocus(); jFrame.requestFocus(); You can still get focus by forcing through the:…
-
0
votes2
answers1314
viewsA: Configure the compiler output path in Netbeans
@Rafael I was needing the same thing, so I found an answer in the English community that served me. Basically you can change the directory of the folder dist who finds his .jar (or .exe) changing…
-
0
votes1
answer137
viewsA: Syntax error in Mysql database
Try to separate the $$ of END and the ; of DELIMITER at the end of the instruction. END $$ DELIMITER ; Without the space you say that these characters are part of the command and this may be causing…
-
1
votes1
answer692
viewsA: jFrame frozen/locked when opening in a jTable
Vinicius, from what I understand from your code what is happening is the following: The jFrame1 is being executed in a thread specific, you then do a search and create a data list and then pass to…
-
1
votes1
answer230
viewsA: Problem switching from Controller to Model
@Matheuslopes I think it’s just the order you’re calling Model.executa() and Controller.Values() in the Bancomvc class, try switching to something like this: public class BancoMVC { public static…
-
2
votes2
answers711
views -
9
votes2
answers839
viewsA: What does Java FE and BE mean?
Developer Java Front-End (FE) and Java Back-End (BE). Not the best definition, but here you are a definition to get an idea. The terms FE and BE is not restricted to Java, can refer to any…
-
2
votes1
answer276
viewsA: Jtextfield formatting with CPF mask
@fbarros you can implement the Document and setar interface in Jtextfield. I suggest you extend the class javax.swing.Plaindocument, then overwrite the method insertString(int offs, String str,…
jtextfieldanswered Dener 813 -
2
votes2
answers437
viewsA: Select if the collection contains a particular object with Hibernate Criteria
@Resende try overwriting the "product" equals. Or you can use the primary key inside Restricions.in like this: session.createCriteria(Grupo.class) .createAlias("produtoCollection", "produtos")…
-
1
votes1
answer193
viewsA: Is there any way to add more than one mask to a Jformattedtextfield?
@Jnmarcos does not believe that it exists without extender and create your own Formatterfactory. But you can use a simple solution like:…
-
6
votes1
answer400
viewsQ: How to Change the VM Heap Space on a Netbeans Platform Project
I’m having the following problem: I have a project from Application of the Netbeans Platform that during the execution the application hangs for good and nothing else responds (one minute of…