R2J    -     Frequently Asked Questions


Exactly what controls are supported?
What Layout Managers are used in the converted dialog?
Some fonts do not look the same as in the original dialog. Why?
A component is missing from the converted dialog.
What is a Demo version?
How can I quickly test the resulting Java code?
Can I convert several resource files in a single run of R2J?
What is the difference between the jdk1.1 conversion and the jdk1.2 conversion?
Does R2J work with Windows 2000?
I have a problem. How can I contact you?
I can't convert my C++ code into Java code.
I can't convert my DFM resource files into Java code.
The current version of Java is 1.4. R2J only supports 1.1 and 1.2.


Exactly what controls are supported?
R2J supports Windows Resource Files. We have included all controls defined in Microsoft Visual C++ 5.0, and also Borland controls from OWL 4.5 such as BorShade, BorCheck, BorBtn and BorRadio. Files created with any of those products convert flawlessly, but we have not tested beyond that. Custom controls are not supported. To top

What Layout Managers are used in the converted dialog?
The Layout Manager is set to null in the code for the converted dialog, and absolute positioning is used to position and dimension all controls on the dialog. The original C++ dialog uses absolute positioning. The converted Java dialog also uses absolute positioning because it is supposed to be as similar as possible to the original C++ dialog. To top

Some fonts do not look the same as in the original dialog. Why?
Virtual machines render fonts differently than native C++ compilers. To compensate for the differences, R2J adjusts the font sizes automatically, using a pre-defined factor which works well in many cases. However, if fonts still look different, you may have to edit the Java source file and change the font size for the affected components. Simply modify the size parameter in the setFont(new Font(...)) call for that component. To top

A component is missing from the converted dialog.
R2J deletes a component if an error occurrs while processing that component. We may have overlooked some detail in the code, or there may be some problem with the resource file. If you e-mail the resource file to us, we will try to diagnose the problem. To top

What is a Demo version?
When you initially download the code from our web site, you get a Demo version. A Demo version can convert only one C++ dialog, a simple yet impressive example, which is hardcoded in the software. The resource file default.rc corresponding to the example is also supplied with the distribution. You can convert this file and compile and run the resulting Java code to see the converted dialog. You can also open the original default.rc in a resource editor and compare with the converted Java dialog.

You can convert the Demo version into a fully qualified version at any time by entering a key when prompted to do so. To purchase a key, please visit our web site www.SciControls.com. To top


How can I quickly test the resulting Java code?
All converted dialogs include a main method, which is not part of the converted code but instead is used to test the dialog. The converted code is ready to run. You can compile it with javac and run the resulting class with java from a DOS prompt. You can use the dialog as is, or, if you prefer, you can remove the main method and use the class as part of your code. You can also cut and paste pieces of the converted code into your own code. To top

Can I convert several resource files in a single run of R2J?
R2J  does not currently support multiple conversion. I you have several resource files in a directory and try to convert them, name conflicts may arise. R2J generates names automatically and is not aware of names created in previous runs. We recommend that you copy your files to separate directories and convert them one at a time. To top

What is the difference between the jdk1.1 conversion and the jdk1.2 conversion?
Currently, the only difference is in the path specification for the Windows Look and Feel. The following syntax is used for jdk1.1:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
For jdk1.2, the following syntax is used:
UIManager.setLookAndFeel("javax.swing.plaf.windows.WindowsLookAndFeel"); To top

Sending e-mail to us.
Send a brief message explaining your need to R2J@SciControls.com and attach a copy of the resource file if pertinent. We can not reply to each message individually, but we will try to reply to questions of general interest via these FAQs. Read the FAQs carefully before sending the message, we may have answered your question already! To top

Does R2J work with Windows 2000?
Yes, R2J has been tested with Windows 2000 and it works just fine. To top

I can't convert my C++ code into Java code.
R2J does not convert C++ code. R2J is used to convert dialogs described in Windows C++ Resource files into Java code. A C++ resource file is a text file that contains a description of the resources used in a C++ program, such as dialogs, buttons, menus and edit boxes. A resource file does not contain C++ code. Resource file names usually have an extension of "rc", while C++ files have an extension of "cpp". Converting C++ resources to Java code is part of the process of converting a C++ program into Java. To top

I can't convert my DFM resource files into Java code.
DFM files are files created by Borland C++ Builder to keep its resources. The DFM format is specific to Borland tools. R2J can not convert DFM files into Java code. To top

The current version of Java is 1.4. R2J only supports 1.1 and 1.2.
Version 1.4 is not yet supported. However, according to a user of R2J, including "com.sun" as a prefix to the "LookAndFeel" line will correct all the Java 1.4 errors and allow the windows to display properly. To top