Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

eric moon

Ranch Hand
+ Follow
since Nov 26, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by eric moon

Griffon is just now supporting javafx. A little early to tell where this will lead. Interested in hearing from anybody who has tried it.
10 years ago
how awkward and surprising that there is no java-based bbe software!! open-source gods where are ye, when we needed ye???

Well, let me add to the annoyances with this bbe, the fact that, unlike virtually every other forum I belong to, there is no

"to stop recieving updates on this topic, click the following link"

message tacked on to the emails I am recieving.

Nor is there the reassuring

"you will recieve no further emails until you visit this topic"

message.

No, I get the FULL REMINDER with every single posting lo these many YEARS after lodging the original complaint.

oh the IRONY!!! the mind reels.

-e
13 years ago



I think you want :



the change worked but i dont understand why ?



This is why you never name a variable "v":




make more sense?
16 years ago
For filling out forms of a few pages, HTML works. But try doing bug reporting on Oracle CRM system day in and day out. Thousands of man-hours wasted waiting for and scrolling through HTML pages. The fact is, if you are going to work with a tool on a daily basis, a web interface is not appropriate. And if you want to support drag and drop, or editable trees or tables or sliders, or have your GUI update in response to user data, forget it.
In fact, I can't even resize the window I'm typing on now!
Just one man's opinion, of course.
17 years ago
extend AbstractTableModel. It's easy to implement the abstract methods. Your data will be a Collection of Orders (vector, hashtable, etc). GetColumnCount will return the number of fields in an order, and GetRowCount will return the size of the order Collection. GetValueAt will return the appropriate field of the appropriate order. You can create a method addOrder, and just put a new order in the collection and call fireTableRowsInserted.
HTH
17 years ago
Profession Java Programming by Brett Spell contains code for a gui based program that lets you see the effect of changes in the constraints in real time. I'll bet you can download the code from their website, as no CD was furnished with the book. The class is GridBagTester, and it's in chapter 5. (This is a great chapter, and a great book, itself. I never bothered to run the software after reading it.)
17 years ago
My company decided against a move to EJBs, because "we didn't want to support an API". Does this make sense? In what way might we be having to support an API by moving to EJB? We do catalog services for eProcurement, and have a product with a search engine that runs against a database, with a shopping cart feature and an interface that can be customized using JSP. I'm just wondering how EJBs would impact that kind of a setup, and what would be involved in switching. What advantages would we gain, if any? (Given that it's already functioning!) Thanks!
You might try adding a keyListener to the combo box. When it sees a tab it could call stopEditing() on the table, and send the tab onto the table. Don't know if that would work. Or you could kludge it to send out a second tab event....
e
18 years ago
You have to call setPreferredSize() to get the button to resize. You may also need to call setMinimumSize() depending on the layout manager you are using.
18 years ago
You might try subclassing AbstractTableModel. That worked a lot better for me. You only have to implement a few methods: getColumnName(), getColumnCount(), getRowCount(), isCellEditable(), setValueAt() and getValueAt(). You can use a vector of vectors, or an array of arrays, or a hashtable of treemaps, whatever works for your data. Just figure out how the methods affect your data, and you're set. All the listeners to the Tree are set up by AbstractTableModel().
HTH
eric
18 years ago
You need to override getColumnWidth. Here's how I did it. Whenever I call fireTableDataChanged() I make a call to setColumnWidths():

If you want the table to fit its contents you can put some code like this in your table:



[This message has been edited by eric moon (edited November 06, 2001).]
18 years ago
Ouch! That's a lot of kludging to get a simple result. All you really need to do is set your own renderer for the column in question. You can even put it in an anonymous inner class. Here's how I did it:

Worked like a charm for me!
e

[This message has been edited by eric moon (edited November 06, 2001).]
18 years ago
You will need to add a keyListener to your table. Listen for the VK_ENTER event, and when you see it (in the actionPerformed method), add a row to your table model, and call its fireTableStructureChanged() method. This will redraw the table.
HTH
e
19 years ago
Well, I didn't need to deal with the autoscroller. I just disabled the drag-to-create-selection functionality in BasicTableUI and implemented it in my drag and drop.
19 years ago
Okay here's what I did:
I went into BasicTableUI, and made a copy of it and put it in my package. Then I commented out the mouseDragged() method of its mouseListener. I'm going to clean this up if I can, and make it a small class that extends BasicTableUI, if I can figure out how to remove the existing listener, or override the method that adds it in the first place. Then in my dragOver() and drop() methods, I implement the selection change, as well as copy and paste while dragging.
My only remaining problem is that I can't get the cursors to change from their defaults. I can see my cursors fighting with the default cursors, but the defaults are winning.....
hope this helps somebody someday.
19 years ago