Posts by dnr1 • 388 points
8 posts
-
1
votes1
answer985
viewsA: Page Numbering Problems with iText
Your problem is that you are misusing the class PdfPageEventHelper. In the stretch PdfWriter w = PdfWriter.getInstance(doc, fos); doc.open(); switch (opcao) { case 1: relatorioReservatorios(doc);…
-
9
votes2
answers521
viewsQ: Performance difference between multiple conditions in one IF or multiple IF’s separately?
During a change in a source code, I came across the following situation, developed by another developer: if ( booleano1 || booleano2 || booleano3 ) { if( booleano1 ) { //faz algo } if( booleano2 ) {…
-
3
votes2
answers409
viewsA: Pass-by Object Reference Wrapper to Method
Explaining in detail your problem: 1 - When you create the object k, you allocate in memory an object that references this Integer. 2 - When you call the method muda(Integer n), you are declaring a…
-
1
votes1
answer346
viewsA: Empty dynamic array table
You are declaring the variable itens within the scope of the function adiciona(). Try to declare it in the global scope along with the variable totals.
-
5
votes1
answer2745
viewsA: How to convert a PDF file to TXT in Java?
You can try using the library iText, which has some features ready for text extraction from PDF files. A way to do this would be: public void parsePdf(String pdf, String txt) throws IOException {…
-
2
votes1
answer582
viewsA: CKEDITOR settings override other settings
Probably the author of the question has already solved his problem, but I will leave an answer to any similar questions. By calling CKEDITOR.config, you are advising Ckeditor that you intend to…
-
1
votes1
answer586
viewsA: Multiple buttons (Jbutton) with the same function in different Jpanels
It might be a little late, but maybe it’ll help someone else. When you generate the interface using the Netbeans GUI Builder, the components are generated with private access in the class, i.e., it…
-
2
votes4
answers311
viewsA: Creating Data Base through Stringbuilder
As stated by ramaral, to documentation of execSQL() points out that the method only executes one SQL at a time. What you can do is create a StringTokenizer to split the SQL statements and run them…