Questions tagged as 'java'

1
answer

Error trying to run scene

I made a Scene Builder screen, but when I compile in JavaFX does this error help me? ant -f C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML jfxsa-run init: Deleting: C:\Users\gusta\Desktop\TccProject\LoginJAVAFXML\build\built-jar.propertie...
asked by 13.05.2018 / 00:57
1
answer

Android - Hide ActionBar buttons

I made a code so that a button when pressed shows an EditText. However, I was only able to hide the title and icon of the application. So how do I hide the buttons too? MainActivity.java: package com.mycompany.myapp; import android.app.*;...
asked by 11.05.2018 / 20:52
3
answers

Access modifier protected [closed]

A common class (which is not subclassed) and has no inheritance, can you use a protected attribute of a superclass that has a subclass? If yes, is this attribute visible (without using the get and set methods of the superclass)?     
asked by 13.05.2018 / 02:35
1
answer

Close system after closing Dialog

How can I make a login screen when closing, also close the entire system? In the code below I have a main screen with the "change user" button, when clicking, the system opens a Dialog for the new user to log in, however if the user cl...
asked by 13.05.2018 / 05:43
1
answer

Error: android.widget.LinearLayout can not be cast to android.widget.GridLayout

I'm trying to make an android app that lists the components coming from the bank. The error is as follows:    AndroidRuntime: java.lang.ClassCastException: android.widget.LinearLayout can not be cast to android.widget.GridLayout FILE N...
asked by 14.09.2018 / 05:33
1
answer

Why does my Client only send two requests?

My HttpClient is only sending two requests. The server receives, returns the 2 values but it is actually a loop that sends a lot of times! Can anyone help me? public static void main(String[] args) throws IOException, InterruptedException {...
asked by 12.06.2018 / 18:55
1
answer

Jtable with monetary value in a single column

Looking to implement monetary value formatting in a jtable, I've tried using the Rafael Chaves as a base and I was able to do the code below. import java.awt.Color; import java.awt.Component; import java.awt.Font; import java.text.NumberForm...
asked by 13.06.2018 / 04:58
2
answers

Search for strings in .log file in Java

I need to create a program where I can search a .log file and find certain strings in it, for example:    The network path was not found. Among others that would represent errors in this log file, they are the ones I want to find. Any...
asked by 08.05.2018 / 21:46
1
answer

Android - Share Preferences for another device

My question is: Can you share information saved by SharedPrefences to another device, either by bluetooth or another connection? MainActivity.java: SharedPreferences.EDITOR editor = getSharedPreferences("pref", MODE_PRIVATE).edit(); e...
asked by 08.05.2018 / 20:52
1
answer

Excesses and database connection

I have a code that does a query in a database. If an exception occurs for timeout for example during query execution, the closing code of the connection and consequent return of the connection to the pool will not occur, should I use a try-final...
asked by 03.05.2018 / 14:58