Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!

chamini prashakthi

Ranch Hand
+ Follow
since Nov 25, 2016
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 chamini prashakthi

Here I use JPA object in the project.So It is based on Hibernate.Not Spring as I think. So is it Correct?
Because I don't know where I use Spring in this project !
1 year ago

I'm implemeting a small application with using JBoss Application server. To keep connection between server and the Db I use Entity manager object.
In my bean definition class i use following code for that

Then in save ,delete ,retrieve methods just use entityManager and call Entity Manager class methods.But I don't have any idea why we don't initialize this entityManager

How we achieve our behaviors without initializing?
1 year ago
I want to how to verify a method of a non-mock object is called?How can I do that?
1 year ago
The jboss server installation directory path must not contain with spaces.
1 year ago
I need it in this way
1 year ago
To print a string values in console I use this statement.

when it prints in the console it doesn'r looks like

Abc[780] abd
Asdbc[23] abd
Adsdbc[090] asd
Assdsddbc[23] abd
Adssdfdbc[090] abd

but I need this way.

Abc[780]    abd
Asdbc[23]    abd
Adsdbc[090]    asd
Assdsddbc[23] abd
Adssdfdbc[090] abd

How can I format my output ?
1 year ago
I use guava cache in my appliation which was written in a hibernate platform. The problem is my cache doesn't work well when loading the data. It doesn't update quickly when I delete or add a new data.

and this is the way I load data to the server side,

Also I don't use the cache in data saving or deletion. Can some one explain me what is the reson for this issue? Is it a problem of guava cache?

1 year ago

Prasad Saya wrote:Since a custom renderer is used to render the cells one has to use javax.swing.table.TableRowSorter and then set a custom java.util.Comparator for sorting. Here is the Oracle's Swing tutorial for that:

Hey ,
I found the problem of here.In my method I declared column value as the row value (fixValue). So then method in my rendering class gets object value as that fixValue and then get some strings and set that value in the column and the tool tip too.

So I can't sort that column according to the string value here.Because it returns all the row value. So whta Can I do here is set the relevant string in the (column no 3) and then pass that string to renderer class.then just set tool tip only.No need of set text here.Because I set value in model class

Just these 3 lines. Simple !!!  

1 year ago

Prasad Saya wrote:

So finally I figure out my mistake here. the getData in my table mode methid was like ...

Okay, then have some pie!

Prasad Saya  
1 year ago

Campbell Ritchie wrote:

chamini prashakthi wrote:Any solution for this please

Please read this.

Sorry for my wrong !!! thankyou for pointing that.
1 year ago

Prasad Saya wrote:Its not clear what the issue is. Can you try this - lets take an example of Person's data in each row. The person has a name, age, sex, city displayed in the table as four rows:
Krish, 22, M, Delhi
Chris, 42, M, Oslo
Lisa, 30, F, Canberra
Ahmed, 55, M, Doha

Now, explain the problem using the above data, or use similar example with your own application's data

Ok prasad.Just think this is my existing table. I click table header in name column and sort my data. Then first row will be Ahmed, 55, M, Doha.but when I click first row to see my data usinng a dialog box it shows Krish, 22, M, Delhi.

So finally I figure out my mistake here. the getData in my table mode methid was like

So it always return same row data whethre it sorted.
So what we have to do gere is change last lne like this,

Simple !!!  

1 year ago
Any solution for this please
1 year ago
I have a JTable with some data.Here I use default table model.There is a small arrow in my table header to do sorting too.It also works fine.What I do with my table is click a table row and the it opens up a dialog box then I can add some data at that point. Then those data goes to column 3. But the problem here is when I click and sort data using 1st column and then  click a row that previously had data now it shows add empty when opens the dialog.

As an example just think I click 1st row and add some data to 3rd column and do sorting. then my first row goes to another place and another line comes to I click my first row.But it shows the data in previous row I had.
1 year ago
I use a cache to load data to my table.Here I refresh my cache for every 5 seconds. My problem is some times my data shows as null whether my cache is not empty.But some times it shows all my data.(IT HAPPENS TIME TO TIME )

this is way that I initialize my cache

I use validation like this before load data to the table,

I  found that when I debug the program my cache is empty.But this validation shows false.So empty data list is loading to the table.(Empty table) I check with the cache size too. Then I found if my cache shows empty but the size has a value. I couldn't find a way to ged rid of this issue.can some one help me to get out from this ???
1 year ago
To solve this isse what i did was add this method to my tabke mode.

If this method is not in the model, when you trying to click a row it is trying to edit your cell
1 year ago