Questions tagged as 'java'

1
answer

JMapViewer to make a MapMarkerDot "clickable"?

I am using JMapViewer , what I want to do is: In the JMapViewer when clicking on the world map, add a MapMarkerDot just where the click was made. By clicking or passing the pointer on the MapMarkerDot that have been...
asked by 23.10.2016 / 15:47
1
answer

How to get% of CPU usage in Java?

I tried to get the percentage of CPU usage with third-party libraries and own java but I can not get it. Can someone tell me the method to get that value from my computer's performance?     
asked by 24.10.2016 / 22:29
1
answer

I have a doubt my circular list program inserts the first node but when inserting another I get an error I could help improve it

Method to insert a node in a list gives me error when inserting another node Here is the code where I have problems: public void insertar(int dato) { if(cabecera == null) { cabecera = new Nodo(dato); } else{ cabecera.setant(...
asked by 26.10.2016 / 04:13
1
answer

Access with the ENTER key

I need to spin the dice by pressing the Enter key, of which the operation is in another file. How can I do this? public class Dice { public static void main(String[] args) { Printer.print("Press 'enter' to roll the dices");...
asked by 25.10.2016 / 16:39
2
answers

How to convert an .exe file to an array of bytes?

How can I convert a file with an .exe extension to an array of bytes using java? I have tried with the following code, but it only works for text files. File soft = jcf.getSelectedFile(); FileInputStream fis = new FileInputStream(soft); archi...
asked by 17.10.2016 / 05:09
1
answer

Problem when using the AdapterView.OnItemSelectedListener implementation in Android Studio

I have a problem using the OnItemSelectedListener implementation, everything is fine but when I add the listener to the Spinner I get an error running the application and the program stops, but when commenting on that line everything returns to...
asked by 16.10.2016 / 21:52
1
answer

I have an exception when I try to run my project and I do not understand why (Selenium and TestNG)

I have the following exception when I try to do some tests with selenium using testng, but it tells me that I have an exception caused by Selenium web driver; as I understand it is by FireFox but I do not know how to fix it. org.testng.TestNGE...
asked by 21.09.2016 / 21:43
1
answer

Difficulties in coping means of more than one algorithm with mean in Java

I have a problem: I have the time it takes for the BFS, DFS and A * algorithms to solve 15 games according to their own difficulties. There are several games for each level of difficulty). He is able to calculate the medium for BFS but not for o...
asked by 28.10.2016 / 14:42
1
answer

Google Apps Script Forms Service from Android

I am working on research for the development of a web browser-type mobile app that opens a page, in order to work in the offline mode of Google Forms. I know I need to use this Google Apps Script Forms service to develop this application, b...
asked by 02.10.2016 / 02:32
1
answer

How to modify data in an array in java?

I have a code is a menu of player records where I must ask for the Number, Name, Age and Position. One of the menu options is to modify the position of a player that is already registered, any idea of how?. The case 4 is the option to...
asked by 29.11.2016 / 04:10