Questions tagged as 'java'

1
answer

TrayIcon with hidden console

I have a program in java , with no graphical interface, only console. The only output commands are System.out.println() . I implemented it so that the program had a trayicon. The problem is that I just want the active trayicon when e...
asked by 29.12.2016 / 14:20
1
answer

I have a checkbox set but only wanted one selected

I have a set of checkbox but only wanted one selected and, if they selected another, the one that was selected was deselected. I've tried this, but it does not work: if (chkfemenino.isChecked()) { params.add(new BasicNameValuePai...
asked by 28.04.2015 / 12:58
1
answer

StackOverflowError in recursive method when traversing folders and subfolders

This recursive method: public static void percorre(File caminho, String espaço){ if(caminho.isDirectory()){ for (int cta = 1; cta <= nespaço; cta++){ buffer.append(espaço); } buffer.append(caminho.g...
asked by 03.12.2015 / 15:23
3
answers

cep - fields disabled for user

I have the following problem: The user will complete the zip code and will click on 'search zip'. A zip search will be done, and the data will be placed in the fields: public place, neighborhood, etc., automatically. It turns out that I do no...
asked by 22.12.2015 / 17:24
1
answer

Read file when directory exists

I am building an application that reads a file in a certain directory, however this file will be generated in this directory at different times from another application, after the application consumes and processes the data the file is deleted,...
asked by 10.12.2015 / 23:24
2
answers

Modular programming in Java, called methods

I needed help putting the smallest and largest method to be "heard" in the main method. The logic of the program is to show the user the highest and lowest value of a vector . CODE: import java.util.Scanner; public class L6ex3 { pu...
asked by 19.11.2015 / 03:58
1
answer

How to change the icon of a .jar file?

I would like to know how to change the icon of a .jar file. Is there any way to do this using Scene Builder?     
asked by 16.01.2015 / 03:46
2
answers

How can I share an Image by Mail, Bluetooth, etc?

I have a ImageView that has a drawable that was edited while using the app, wanted to take this final version of the edition and send it via E-mail, Bluetooth, etc. The way I'm doing it, when I send it by email for example, I get infor...
asked by 17.12.2015 / 14:58
2
answers

How to automatically adjust a JFrame to screen size?

I have a program and when I run on different computers the window gets completely undone and you can not see the components you have in Jframe, I would like to know if there is any way the window can be automatically adjusted to the screen of th...
asked by 08.11.2014 / 23:07
1
answer

Pick up the selected item in Jcombobox

How do I get the item selected by the user in this Combobox? opcaoBusca.setModel(new DefaultComboBoxModel(new String[] {"Op\u00E7\u00E3o da Busca", "N\u00FAmero do Pedido"})); entBusca = new JFormattedTextField(); entBusca.add...
asked by 08.01.2015 / 11:33