Questions tagged as 'java'

1
answer

How to model Product / Stock?

I started a modeling for Products thinking of the same as: Purchased to Resell Produced for Sale Perishable or not So far so good, but when I started thinking about stock control based on that model my head knotted, because of the Lot...
asked by 19.04.2016 / 20:54
1
answer

For inside a Java Switch

Good evening, I would like to know if there is a way to declare a 'FOR' within a SWITCH CASE in Java because Netbeans is accusing a bug well in this part. I'm trying to make an application to play a guessing game just like I read on the site...
asked by 21.04.2016 / 04:11
2
answers

Display JCombobox object data in a JTextArea from the selected item

I wanted to show data from a client that is in a combobox inside a JTextArea, as in the following image: Theproblemisthatonlytheinformationof"Igo Brasil" is shown, when I try to show the information of another client, this happens: Infor...
asked by 25.04.2016 / 02:46
1
answer

Error removing object from an ArrayList

When I try to remove a int from arrayList it is simply an error. Code: ArrayList<Integer> colors = new ArrayList<>(); colors.add(Color.rgb(119, 103, 141)); colors.add(Color.rgb(33, 10, 208)); colors.add(Color.rgb(2...
asked by 06.08.2016 / 20:57
2
answers

How to pass arguments when running program by Netbeans?

This code in notepadd ++ worked because the command line added example port 5000,6000 etc. But netbeans can not do that. So I have the client and server code here. Exchange of messages, ClientTCP.java: import java.io.*; import java.net.*;...
asked by 07.06.2015 / 14:21
1
answer

JVM Instrumentation. Know how many times a method was called during program execution

I have a processing application of batch , currently it is multithreads , I need to know how many times we are executing the save method. Would anyone have any ideas? I need to increase the number of threads during the nigh...
asked by 03.06.2015 / 16:31
2
answers

How to create an application without title bar?

I want to create a app web with a WebView . How can I create an application without the title bar other than fullscreen ?     
asked by 08.07.2016 / 21:31
2
answers

ClassFormatError: Incompatible magic value 0 in class file

My project was working normally. After restarting my machine, running it through the IDE returns the following: Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value 0 in class file Principal$9 at java.lang.ClassLoade...
asked by 19.07.2016 / 21:01
1
answer

Initial focus on JOptionPane OK button

I have the following JOptionPane : AsyoucanseethefocusisontheCancelTeacherIneedthisfocustocomeoutOK,butIhavenoideahowtodothis.Mycode:JPanelpanel=newJPanel();JLabellabel=newJLabel("Digite a senha para iniciar o auxilio:"); JPassword...
asked by 14.07.2016 / 19:17
1
answer

Why, when I change the size of the window, do the drawn components disappear?

I built an application using the windowbuilder of eclipse. In it, when clicking with the mouse, a figure is drawn according to the last button selected. However, when I change the size of the window, all the drawings disappear. After rea...
asked by 12.07.2016 / 14:30