Tuesday, October 29, 2013

Using JScrollPane in Java and getting the contents to actually scroll

This has almost nothing to do with Tivoli, but I hit this stupid problem every few years, and it takes me 30 minutes to figure out the solution each time. So I thought I would post it here:

When creating a fat GUI in Java, you may have a portion of your window that is a JScrollPane, which has a ViewPort and a ViewPortView (often a JPanel) . A common need is to add components to your JPanel (the ViewPortView). However, when you do this, you'll notice that whatever you do with the JScrollPane's scrollbars, it won't scroll in one or both directions. Well, the problem is that the addition of new components does NOT increase the value of the ViewPortView's PreferredSize attribute. So as you add more components, you need to manually update this attribute with code similar to:

myJScrollPane.getViewPort().getView().setPreferredSize(myNewDimension);

I've tried setViewSize(), and that doesn't seem to do anything - setPreferredSize is what you've got to do.


Wednesday, October 23, 2013

TCR 3.1.x and Launch --> Administration and Browser Fun

After installing JazzSM 1.1.0.1, I learned AGAIN all browsers are not created equal.

The browser, version, and java version are becoming more and more important today within the IBM product set and here is another example.

So after having a completed JazzSM/TCR install I went to configure the DB connection for TDW via Launch > Administration and found the following screen appears.  Where is the rest of it?


The troubleshooting starts:
1.  Maybe the installer said the install was SUCCESS, but it really failed.  Better check the logs.
2.  Maybe I need to cycled the application.
3.  Let me check the user permissions.
4.  Lets create another user.
5.  Did the Cognos content store DB get created.

After talking to Venkat Saranathan (the GBS resident TCR expert), he suggests trying I.E (his favorite browser) instead of Chrome.

If you use Firefox or I.E the gui draws correctly or at least the buttons are now there.  I.E. had other issues since I was using version 10 and version 10 is not supported for TCR. So after trying Firefox I was able to complete the configuration.



If you want to see what browsers and version are supported for JazzSM 1.10.1 check out the following link:
http://publib.boulder.ibm.com/infocenter/prodguid/v1r0/clarity-reports/report/html/softwareReqsForProduct?deliverableId=1315519207893&osPlatform=Windows#
--> Then Select prerequisites