Robert Upshall

Greenhorn
+ Follow
since Aug 23, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Robert Upshall

I am relatively new with CORBA, most of my experience comes from
relating it to J2EE. I am attempting to connect to a third party vendor
via their CORBA server.

I need to run the client on my iSeries running v5r2m0. I cannot get a
connection.

Here is the snippet that attempts to initialize the ORB:




When I run it from qsh I get:



Can anybody offer any assistance, with my limited CORBA experience I
have exhausted my resources.


Thanks,
Robert
20 years ago
What are the possible reasons that may cause requestFocus() not to work in linux when is works in windows?
I have a screen that does some edit checking for required fields, if the field is required and it is blank I popup a dialog and position the cursor on the field.
This works on %100 of my fields in windows, in linux the requestFocus() works on some fields but not on others, what might cause this?
Robert
21 years ago
Does anybody know if 1.4 handles key/input buffering differently than 1.3 did?
We have a payment entry interface that is linked to a bar code reader, on our last release (1.3) users could buffer up entries, on this release 1.4 each payment need to wait for the other to resolve first, no code has changed, just the jvm.
Robert
21 years ago
Maybe I can be more clear as to what I am attempting.
I have a Class that extends JPanel with a Close button on it, I use this class in a second Class that extends JFrame. I want to handle the close action event in both classes, first the panel, second the frame.
i.e. When the user click on the close button, I close any connections contained in the Panel class and then after they have been closed pass the event along to the Frame so I can remove the Panel from the tabbed pane in the frame.
I need to be bale to listen and handle the same event in 2 classes, can I do this?
Robert
21 years ago
I am have a class that extends JPanel with a CloseButton on it. I want to be able to handle the Close event in the Panel Class itself and in the container that uses it.
The problem seems to be that the event is being handled in the containing class before it is being handled in the Panel. How can I handle my Panel class before it reaches the containing class. Also can I somehow catch the event in the panel class if I need to and not pass it to the containing class?

Below are some code snipits of the panel and containing classes.

ClassWithCloseButton ...
class MyEventHandler implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == getCloseButton()){
doMyMethod();
}
};
}
public void removeCloseButtonActionListener(ActionListener listener){
getCloseButton().removeActionListener(listener);
}
public void addCloseButtonActionListener(ActionListener listener){
getCloseButton().addActionListener(listener);
}
ClassThatUsesOtherClass ....
class MyEventHandler implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == getMyClass().getCloseButton()){
doMyMethod();
}
};
}
21 years ago
I have a JList that is in a JScrollPane. It is possible for the list to be larger than the viewport. What I want to do is always position the scrollbar to the bottom of the list, the default is the top of the list. How do I set the scrollbar positon in a ScrollPane.
I have atempted
myScrollpane.getVerticalScrollBar().setValue(listSize);
but this doesn't appear to be working, is this the proper way? If not what would it be?
Robert
21 years ago
I have a Swing app that uses .gif files for displaying on icons and such. I was wondering what is the most common location to place these extra files when when packaging.
i.e.
If I have a class com.mycompany.CustomerEntry that uses a file customer_icon.gif, should I place the customer_icon.gif file in /com/mycompany/customer_icon.gif or /com/mycompany/somedir/customer_icon.gif or /customer_icon.gif, etc ......

I know it doesn't mater one way or the other but I was wondering if there was a generally accepted standard as how to do this.
I would welcome any ideas from anybody as to what method they use.
Thanks,
Robert
21 years ago
Hi,
I need some help validating input, with the code below it validates type and field length but it requires me to pad data with zeros to fill out the mask. How can I use JFormattedTextField to do what I want to do, or can I?
// code snipet
try
{
fmt = new MaskFormatter("###########");
}
catch (ParseException ex)
{
// handle
}
number = new JTextField(fmt);
//

I have tried a few different things but none of them do exactly what I am need.
Robert
22 years ago
Nate,
Thanks so much for the last post, I have been looking for a method like that since I started playing with application programming. It was exactly what I was looking for.
Thanks,
Robert
22 years ago
I may not have asked the question properly or I may just not understand the anwser.
I know I can store info in a Vector or a Hashtable, my question was ment to be more how do I access it.
ie.
App1 -(click)-> [Button1}

[Button1] -(triggers)-> new App2()

if in App1 I enter my name, how
do I put in somewhere that I can go
get it in App2
In a servlet I would just put it in the session and then get it again, my question is ment to be where/how do I put it somewhere so I can do a get of sort in App2 to get it.
Robert
22 years ago
Hi,
I have a question that I think has a very simple answer, forgive my ignorance if it is a dumb question.
I am currently attempting my first set of Swing applications, I am moving to swing from a servlet background.
I have written small swing applications before but I am about to start a larger scale project and I need to know if there is a swing/application way of doing something I found quite useful with servlet programming.
I need to know how can a put something in "memory" and access it in any called class under it. i.e. is their a swing/application equivalent of a session
I want for example to start my app, load a config file, and put the config setting somewhere that can be reached by anything else used in that application.
This might be a stupid question or it might not be doable but I'm looking for a way to pass data between swing class without having to pass them on the constructor of each class.
I hope this makes sense,
Robert
22 years ago
Thanks, this worked.
I have another question now, are there any platform independant ways? ie. how might I do this in linux or Mac OS?
Robert
22 years ago
I have a Swing application, the application has a menu bar with a Help menu, the Help menu has an "Our Website" menu item.
I want to know what I need to do to make an event open a browser/web page. I know how to trap the action, I need to know what I need to do to open a browser.
Robert
22 years ago
I found my problem, it was caused in a completely different place because of the list refresh.
The bean was throwing the event and it was being caught in another place I wasn't expecting, this was where the problem was.
Its fixed now, sorry to bother,
Robert
22 years ago
/**
* Comment
*/
public void deleteButton_ActionPerformed(
java.awt.event.ActionEvent actionEvent)
{
try
{
String initials =
((String) getSession().get(EnterInitials.INITIALS)).trim().toUpperCase();
int i = getPaymentList().getSelectedIndex();
Object[] entmstKey = new Object[1];
entmstKey[0] = (BigDecimal) ((Object[]) getPaymentVector().elementAt(i))[0];
DB2File entmst =
new DB2File(
getSystem(),
"/QSYS.LIB/%LIBL%.LIB/ENT" + initials + ".FILE/%FILE%.MBR",
DB2File.KEYED,
entmstKey);
entmst.open(AS400File.READ_WRITE);
Record record = entmst.chain();
if (record != null)
{
entmst.delete();
}
entmst.close();
getPaymentList().delete(i);
}
catch (Exception e)
{
PSAOptionPane.showErrorDialog(this, e);
}
return;
}
22 years ago