Questions tagged as 'java'

1
answer

How to leave the first uppercase character on the keyboard?

How to make keyboard start with a capital letter so the user can start typing without having to tap the arrow to leave the capital letter? I used android:inputType="textCapCharacters" but it did not work right because it writes the who...
asked by 18.01.2017 / 21:07
1
answer

Validate List of radium buttons with Angular.JS

I have a list of radium buttons and I need to control by angular: Validations: one option at a time and display message. Code:<!DOCTYPEhtml><html><head><title></title></head><body><div><labe...
asked by 10.02.2017 / 21:50
2
answers

Capture list item by index

I have the code: for(int i = 0; i < 99999; i++) { minhaLista.get(i + x); //x é int e possui um valor qualquer } At some point the sum of i + x results in a value greater than the size of the list. If I execute this code I w...
asked by 24.03.2017 / 15:00
1
answer

Set button text color programmatically

I have a button created in my class Main via code, that is, programmatically. See: Button btnJonSnow = new Button(this); btnJonSnow.setText("Jon Snow"); How can I set the color of the button text programmatically?     
asked by 03.04.2017 / 07:48
2
answers

Error inserting data into SQLite database [closed]

Class that creates the bank public class CriaBanco extends SQLiteOpenHelper { private static final String NOME_BANCO = "lista.db"; private static final int VERSAO_BANCO = 1; public CriaBanco(Context context) { super(context, NOME_BANCO,...
asked by 04.04.2017 / 01:34
1
answer

How to capture the colors of a Label that is behind another label?

I have two JLabels overlapping each other. JLabel label = new JLabel(); label.setBounds(15, 15, 300, 300); label.setOpaque(true); label.setBackground(Color.red); JLabel label1 = new JLabel(); label1.setBounds(60, 60, 300, 300); label1.setOpaq...
asked by 05.04.2017 / 22:35
1
answer

Field reading HTML tags in JSF [closed]

I would like in my field that I will add the text and send it to the bank, add for example a link ex: <a href="http://www.globo.com/" ></a> , however, when printing on the screen, coming from the bank, it printed the complete t...
asked by 03.01.2017 / 11:39
1
answer

Barriers with threads - Output code excerpt

I have the following code snippet. Can someone explain the following question to me? In main when I create the two threads, I go to the Boat constructor and notice that it sleeps a second. Why is it main that assumes this...
asked by 04.01.2017 / 01:18
2
answers

set environment variable in application.properties

I have a project in Spring boot where in application.properties I wanted to set the file location that I'm going to process. I do not know the best way to do it. I wanted to have the parameterizable directory in an environment variable in the sy...
asked by 04.01.2017 / 12:33
1
answer

Error when using AdRequest

Could you help me find the error in this OnCreate method specifically in the AdRequest class? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);...
asked by 22.03.2017 / 17:04