Questions tagged as 'java'

2
answers

Toggle the colors of a column using the java library - apache poi

I'm using java with the api poi library to create an excel spreadsheet. I need to keep alternating colors, from the 1st column (that is from department), between yellow and blue, when the data are different too.Ex .: Dep = 1 - Color = yellow...
asked by 20.09.2017 / 20:23
1
answer

Service Discovery Eureka Netflix

I have a SOA architecture with two stacks different one with java and another with ruby, I have a microservice using spring boot and other rails, and I'm trying to configure a Service Discovery with Eureka for java projects especially wit...
asked by 22.09.2017 / 14:22
1
answer

Where to store binary files in JUnit unit tests with Maven?

I have the following directory structure for the resource folder of unit tests: src/test/resources/*.files In order for me to read binary files (such as a PDF for example) to complete a unit test, I am putting these files in the test / reso...
asked by 04.04.2018 / 21:47
1
answer

Modify the indexes of each item in a TreeView Java FX or override method TreeView.getSelectionModel (). select (int index)?

Greetings to all. This is my first post here. I'm developing a Java FX project that consists of a form with a TreeView whose items are obtained from an ArrayList, previously populated through a query to the database. Thistablerepresentsah...
asked by 04.04.2018 / 04:51
1
answer

Recover network gateway?

Does anyone know or know any way to find the ip address of gateway of the network? The local ip I know I can recover with class InetAddress : InetAddress.getLocalHost().getHostAddress();     
asked by 23.04.2018 / 22:12
1
answer

How best to relate this entity

In my application I have a user entity that relates from many to many with the entity courses (one user can enroll in many courses and one course can have multiple users) And the Entity courses relates one to many with the Entity class (one cour...
asked by 20.04.2018 / 19:09
1
answer

java.sql.SQLException: Can not issue data manipulation statements with executeQuery ()

My key insertion is not being done. And the error it gives in the console is: java.sql.SQLException: Can not issue data manipulation statements with executeQuery(). at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086) at com.m...
asked by 18.04.2018 / 22:28
1
answer

Data not displayed in table by AbstractTableModel

I'm developing a ticket request system, however because I have to add JXDataPicker to the table, I had to implement AbstractTableModel . The model apparently complies with the documentation, I can display all the fields, but I ca...
asked by 30.10.2017 / 04:46
1
answer

Widget action confirmation is possible?

I have to put an AlertDialog to confirm that the user wants to perform a certain action, it is simple to do this in an activity or fragment, but I am having trouble doing this in the widget, I tried to do but I am only getting errors as a return...
asked by 13.10.2017 / 14:48
2
answers

read only first and last line file

I'm picking up all the lines from my file. However I can not get first and last save in a variable. I have the following code snippet to read from the file: ler = new Scanner("C:\Users\Douglas Williamn\Documents\2244.txt"); String roman...
asked by 19.12.2017 / 19:41