Questions tagged as 'java'

1
answer

What's the difference between using SwingUtilities.invokeLater (Runnable) and EventQueue.invokeLater (Runnable) when invoking a window?

I was reading this answer where you talk about using EDT to manipulate swing components, but there it is suggested to use one of the two methods quoted to" dispatch "the interface to EDT. > There is a difference between using SwingUtil...
asked by 11.01.2017 / 14:05
2
answers

Execute PROMPT / CMD commands in Java [duplicate]

Good people, I would like to know how to execute this command in Java: attrib -R -A -S -H /S /D I:\*.* This program is for cleaning pendrive viruses. I already consulted some materials here in the forum, but could not apply. Basically...
asked by 27.11.2016 / 05:04
1
answer

Configure the spreadsheet created by java with jxl

I'm developing an application that generates an excel sheet with data collected from other files, for this I'm using jxl, the application is already generating the worksheet correctly, however I need to change some of the settings of these works...
asked by 17.08.2016 / 16:31
1
answer

Can you override constructors?

I think I can not, what do you have to tell me? @Override public class main (String arg[]){}     
asked by 12.05.2016 / 21:45
2
answers

Notification using PHP and WebService on Android

I have a project in mind but I have not yet started to develop it in practice. The idea is to develop a PHP + MySql Web system and an Android application using WebServices. My question is if it is possible to generate notifications on Android th...
asked by 10.05.2016 / 13:39
2
answers

Call the Java compiler from a Java class

So, this is what I would like to know is if I have to call the Java compiler from one running class to compile another and generate the .class from it. How can I do this?     
asked by 14.03.2016 / 14:07
1
answer

Order of class initialization / instantiation

class Bird { { System.out.print("b1 "); } public Bird() { System.out.print("b2 "); } } class Raptor extends Bird { static { System.out.print("r1 "); } public Raptor() { System.out.print("r2 "); } { System.out.print("r3 "); } static { System...
asked by 18.03.2016 / 11:14
2
answers

Button click event

Add some buttons like this: JButton bt; for(int i = 0; i <= 10; i++){ bt = new JButton("BT : " + i); bt.setPreferredSize(new Dimension(80, 80)); bt.addActionListener(new ActionListener() { @Override public void a...
asked by 17.03.2016 / 21:02
1
answer

Error compiling robocode

Good afternoon! I'm having trouble compiling Sample Robo in Robocode, where the error below is displayed:    Compiling ... Unable to load annotation processing manager   org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcess...
asked by 16.08.2018 / 14:49
1
answer

How to rotate an array in Java?

I have a two-dimensional array, size M x N, that stores tiles of a map, in the following format: [1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12] And I want to rotate in 90º (ie rotate the map so that the North is in the East). The rotated...
asked by 08.03.2017 / 05:48