Questions tagged as 'java'

0
answers

Rotate image with class Graphics

I have a little problem with my code, which has to do with the Graphics class. I need to draw a robot and after that I have to rotate the number of degrees set. I've tried with AffineTransform.getRotateInstance (rotate, centerx, centery), but I...
asked by 28.03.2018 / 23:24
0
answers

Percentage of CPU usage limited for Java? [closed]

I just generated the executable (.exe) of an application I did in Java. The problem is that in the task manager shows me a percentage of CPU use always less than 30%. Can this percentage be increased? How do I modify the icon that appears...
asked by 23.04.2018 / 23:34
1
answer

Help with failure in an adapter of a recyclerview, when putting several items

and thanks in advance. I show you my code to see if you can tell me what my mistake is ... public class AdapterHome extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private ArrayList<Item> items; Context context;...
asked by 27.04.2018 / 01:24
3
answers

how to call a method from one class to a method from another class

The question is this, I have to calculate the perimeter of a triangle but I need to call the method calcularDistancia of class Punto a class Triangulo in the method calcularPerimetro or in simple terms put a method in...
asked by 09.05.2018 / 03:19
1
answer

AccesDeniedException, in pure java on Android 8.1 with AIDE

I have a pure java program that encrypts files from a specific directory (in this case the sdCard) and I'm running it on Android Oreo 8.1 with the IDE for Android called AIDE (it's not an Android application, it's pure Java) , and there is a blo...
asked by 07.05.2018 / 15:51
3
answers

Can an AlertDialog be customized with buttons and that these work as the default ones?

In my XML I set the view with 2 buttons (Cancel, Accept), and create my own class of AlertDialog and AlertDialog.Builder so that it is the same throughout the application. The question is that I want my Cancel and OK button...
asked by 12.03.2018 / 21:43
2
answers

How to add several objects to an object?

I have a class called Book in which the attributes are name id and an object of another class called author. My question is whether it is possible to add several authors to a single object of the book class? package p; import java.util...
asked by 12.12.2018 / 22:55
0
answers

EXPRESSION TREE from an operation closed by keyboard [closed]

Could someone please help me with the java code of how to build an expression tree and calculate its result, from an operation entered by keyboard, I know that batteries should be used, but I do not know where to use them public class ArbolEx...
asked by 15.12.2018 / 01:34
1
answer

Error registering with Oracle from JAVA Netbeans

Good afternoon friends I have a problem with an application that I am developing, it is something simple. By registering a person in my Oracle Database. That's my Conexion class. public Connection xconecta(){ try { Class.forName("or...
asked by 18.03.2018 / 18:49
1
answer

Error generating keys: java.security.NoSuchAlgorithmException

I'm doing some cryptography tests, by executing the following line of code: Signature sgn = Signature.getInstance( "MD5" ); I get the error:    java.security.NoSuchAlgorithmException: MD5 Signature not available I have tried SHA, SHA...
asked by 13.02.2018 / 19:18