Posts by Mari Teixeira • 327 points
14 posts
-
0
votes2
answers1676
viewsQ: java.lang.Noclassdeffounderror running application
I made a java program that uses JDateChooser for the user to choose the date they want. It works normally within Eclipse but when I export the project to a .jar and try to run by cdm it shows the…
-
1
votes1
answer198
viewsQ: Which string library can I use?
I’m refactoring a code that uses the eclipse plug but I want to turn it into pure java. The idea is to transform String into something with this style: Person@182f0db [ name=John Doe age=33…
-
3
votes1
answer535
viewsQ: Save key with various values in Properties file
I have a file .properties where I carry the name of the tests that will be deleted from my application. This file needs to have the same name as the "variables" since they all mean the same thing…
-
2
votes1
answer561
viewsQ: Formula Excel - Apache POI
I created an excel file using the Apache Poi API, in it I set one of the cells with a formula, but when I open the file I need to "enter" the cell with the formula so that it prints the result in…
-
0
votes1
answer580
viewsQ: Access a directory through a jar
I created a code that uses a file that is located in a given directory (Resources). When I run this code by eclipse, this directory is found and all code actions are done. However, when generating a…
-
4
votes2
answers351
viewsQ: Joptionpane in the foreground
I have an app that uses one JOptionPane to show an error message, however I would like the JOptionPane always appeared in the foreground. JOptionPane.showMessageDialog(null, "Usuário ou senha…
-
1
votes0
answers113
viewsQ: Make "Enter" trigger an action
I have a login screen to a system and I want that when the user has a selected button, when pressing "Enter" on the keyboard, the button triggers its action. Ex.: if the confirm button is selected…
-
1
votes1
answer1585
viewsQ: Alphabetically Sort an Arraylist
I have an Arraylist called Test with the fields: public class Teste { private String dctitle; private String rdfabout; private String dbid; private String depto; private String sigla; private String…
-
0
votes2
answers614
viewsA: Toggle the colors of a column using the java library - apache poi
I got guys... There must be some way much more practical, but I’ll post here what I did for those who need: int mudou = 0; String depPassado = ""; for (int i=0; i <teste.length; i++) { row =…
-
2
votes2
answers614
viewsQ: Toggle the colors of a column using the java library - apache poi
I am using java with apache poi library to create an excel spreadsheet. I need to keep alternating colors, 1st column (which is department), between yellow and blue, when the data are different as…
-
1
votes3
answers3370
viewsQ: How to convert Date to whole in Java?
When I use this code: Date data = new Date(); SimpleDateFormat formatador = new SimpleDateFormat("dd/MM/yyyy"); int dataAtual = Integer.parseInt(formatador.format(data));…
-
1
votes2
answers461
viewsQ: Convert JSON to Array in java
I have a JSON that represents a test query: {"dctitle":"TestesStatus", "oslc_cmtotalCount":2, "oslc_cmresults": [ {"dctitle":"33643640", "rdfabout":"XXXXXXXXXXX", "dbid":"XXXXXXXXXXX",…
-
-2
votes2
answers3257
viewsQ: How to remove a part of a string?
I have a text saved in a string and need to copy a part of that text to find a certain word in it. Ex. I need to remove my name and my age from this text, I know they always come after : and in…
-
3
votes1
answer622
viewsQ: Hssfworkbook - How to copy one spreadsheet to another?
I have a spreadsheet of excel I need to copy some data into another spreadsheet. This old spreadsheet is like a "base", I need to copy only the header and caption part (with the cell style, in…