peter petros

+ Follow
since May 09, 2010
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by peter petros

Hi, I have a class as follow :

Until now, I had expressions with the operator on penultimate position ie BBB-CCC-DDD-LE-CC

Now the operator can be on previous positions such as BBB-CCC-DDD-LE-AA-CC

Could you help me please ?

10 months ago

Carey Brown wrote:What library are you using to interface with excel? POI?

yes I am using org.apache.poi
11 months ago
I have a LocalDateTime field which I pass it as parameter in a method setCell of an interface (for creating excel) as below :

When I open the excel I see that the column with the date cannot be sorted as expected as the value is defined as String

Is there any way to replace the T with a space ?

The method setCellValue is able to have as parameter one of the following classes
Date, LocalDate, LocalDateTime, Calendar

Could you help me please ?
Thanks in advance
11 months ago
Hi all,
I want to make an integration test and as first step I have to insert some data to a table.

Let the table be 'TABLE_1' with the columns id (number) and comment (blob).

I want to insert value 1 and a empty test.xlsx file.

But I get the following error :
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-01704: string literal too long

And I dont know if it is what I need.

Can I make somehow differently ?

For example creating a File and without having all this string ?

Thanks in advance for your help
Hi all,
I am working on a multimodule application as follow :

I want to read the file from

I have created the following code :

and I call the method

The problem is that I get NullPointerException as I cannot find the file.

I tried to move the file in the same path with and it works as expected

Any ideas how to solve this problem ?

Thanks in advance
1 year ago
Hi all, I am trying to make a method to return Map<Pair<String, String>, Set<String>>.
But I don't know how ..

Suppose I have a class called Person with attributes Name and Surname

I also have a method which returns a list of Person objects

I want to make a method returning the map which consists of
Key : a Pair object phase_name and distinct Person name
Value : an ordered set of surnames for the specific phase and Person name

Expected, something like that :
  Map<Pair<"PHASE_1", "ADAM">, SET<"JOHNSON">>
  Map<Pair<"PHASE_1", "OLIVER">, SET<"JONES","SMITH">>
  Map<Pair<"PHASE_1", "JOHN">, SET<"JOHNSON">>

Thanks in advance for your help
1 year ago
Hi all, I would like to save an image in an Image variable of a class.

My class is the Student

And in a form I have declared an array list : List<Student> list;
And an JDesktopPane with a label included lbl_image   and a button called jMenuItem1

How can I set the img to the database ?
7 years ago
Hi all,
I have 20 jtable with names TABLE_1, ... ,TABLE_20   (in a pannelTab)
In these tables I have data of list   List<STUDENT> students based on some criteria.

Moreover, I am using 20 DefaultTableModel called model1, ...model20

I want to click on a button and edit a row of the STUDENT but I don;t know how can I
get the current tab in order to use the appropriate model.

Could you help me please with an example ?

7 years ago

Paul Clapham wrote:In general I would recommend not mixing AWT components (e.g. Applet) with Swing components (e.g. JLabel). If you do you will see strange things happening. And in specific... do you have a question about that code? It's hard to do much without a question to answer.

I changed my code to

1. I want the new game button to start the game from the beginning.
I call init() but the image is not initialised.

2. I would like the order of panels to be vertical structured like :
New Game

Could someone help me please?>
14 years ago
I want to make an applet game like this on url :


Could someone help me please ???

I am trying to write code but I don;t know good java.
My code is :

thanks a lot
14 years ago