Questions tagged as 'java'

2
answers

How to change the size of the rows of the vertical grid of a JTable?

How do I change the size of the vertical grid lines of a JTable? Ex: jTable.setRowHeight(30); This method changes the width of the line. Is there any other similar to this that changes the vertical grid width of the columns? Below...
asked by 10.05.2018 / 21:38
2
answers

Button does not work when code is added to AbstractTableModel

I created a test project to implement in a larger project of a table with a button as one of the elements of the row. It works perfectly, but when I try to add to my code the button does not perform the action that was programmed. It is being do...
asked by 30.10.2018 / 17:31
1
answer

Attribute and private field and getter and setter in object-oriented programming in Java

In object-oriented programming in Java, when I create a particular attribute or private field, without its methods getter and setter do you have to set the attribute to final or do not require? For example: public class...
asked by 03.11.2018 / 12:43
1
answer

Store digital certificate on Server

I'm creating an application that will work and manage digital certificate clients. The idea is to import the client's certificate and I leave available subscription and transmission methods to for example, for example. But for those who under...
asked by 21.03.2018 / 18:38
2
answers

Better structuring of an object-oriented code

I came across a code structuring problem and needed some help. I made a diagram below with two different methods of structuring the same code (I could not create the code yet) and wanted to know which one is better (or if there is an even better...
asked by 19.03.2018 / 13:28
1
answer

Txt file manipulation in JAVA

Hello, I'm a beginner in java and I need to create a program that creates a txt file with a pre defined content, read it and divide the contents of this file into two different txt files. start with // (java comments) and pass the rest (it will...
asked by 20.04.2018 / 21:59
1
answer

How to randomize the values of an object in java

I am building a card game program, where at a certain point he should mix the cards and pick up the one in position 0, but I can not do that. Here is the code: public class Baralho { Carta[] cartas = new Carta[52]; String[] naipes = {"Copas",...
asked by 01.05.2018 / 22:52
2
answers

What is the most efficient way to get information on any website and use it in an Android APP?

For example: An app that visits link and get the current dollar value and show it in the app. What are the ways to do this?     
asked by 08.05.2018 / 01:36
1
answer

Instantiate the object of a Map only when necessary based on a regex

I have a Factory that instantiates the PARSER responsible for extracting information from a particular invoice format. To determine the invoice format I use regex. I loop every regex added to Map and check if the regex is fo...
asked by 08.05.2018 / 14:51
3
answers

Sum of component numbers

I'm trying to solve the following problem using DESVIO CONDICIONAL COMPOSTO . But I do not know how to calculate the numbers that make up the digit.    Require an integer value between 100 and 999. If the value read is less than 500, di...
asked by 08.05.2018 / 02:55