I have a collection of objects that store (among other things) two integer values. I only want to display one of these values. The displayed value will dictate the sort order of the JTable.
However, I want to break ties with the other, undisplayed, integer value.
I've gone through the trouble of specifying my own Comparator for the TableRowSorter. However, this method doesn't have access to the row index into the table. It is only passed the values in the column that is being sorted, not their position in the column. Without having a reference back to the row index (which I use as an index to the collection of objects) I cannot get the secondary value, unless I also display this value in its own column and sort on Sort Keys.
I don't want to do that, because I feel it clutters up the look of the table.
For example, I have the two sets of numbers
Row Name | Displayed Value | Undisplayed Value
rowA | 7 | 3
rowB | 7 | 5
With this set of data, rowB should be listed above rowA. Any ideas on how to implement this.
I'm pretty new to Swing, so there could be something simple that I'm missing (hopefully).
calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same date, time and room without receiving any error i don't know where to start to compare the days
Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,The code below works great. It creates a table that shows the 25 most recently added tables to a MySQL database called "sitefeather."Each one of these tables has the following
Got A Free Server :(
So I was given a free server http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1990708735It is a Compaq Proliant 1500 :|And I cannot seem to get it to install any OS from the CD drive
Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this('date' => '2008-11-01 00:00:00', 'total' => 1),('date' => '2008-11-03 00:00:00', 'total' =>
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?in PHP of course.i don't know if i'm really that dumb or is it the 36 hours of no sleep that i can't
IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST method?please help
How to change www in url with a specified name
HiI'm trying to change the url http://www.sitename.com/apparels to something like belowhttp://apparels.sitename.com/apparels in PHP.If anybody can help me with the code for the same or provide links
extract a file from zip file
hi,i know how to unzip a zip file in php, but is there a way to just extract a certain file only?
Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in functions, since it's kind of confusing. I just made these functions: <?php function
a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header errorI'm do not know php & have tried removing all "white space" but I cant seem to stop the error displaying.Its a very