Solved

Visual Café: Importing Applet to a Frame

Posted on 1998-03-16
1
206 Views
Last Modified: 2013-11-23
HI!
---
I have a question regarding the best way to import a applet, written in JDK 1.1.2, into Visual Café as a Standard Java Application. The applet contains some buttons to control a movieplayer (reads from a raw data file) and a diagram that plots some values from a data file.

How can I make Café to recognize the components in order to display them in the frame? Should I put all the components on a panel?
0
Comment
Question by:jonte
1 Comment
 
LVL 2

Accepted Solution

by:
shogi earned 150 total points
Comment Utility
In you Visual CAfe project you have to change in the Options of you project: APPLET for APPLICATION (a program that requires java.exe to run) or a WIN32 APPLICATION (a stand-alone executable program).

About the translation applet to frame

All what you have in your applet have to go in the Frame1.
So create Frame1 (insert Form) after that, what it's in your init method have to go in the constructor Frame1().  Don't forget to remove dupplicat line like
            setSize(400,300);
            setLayout(null);

WARNING: Visual Cafe having beginning mark and end mark like :

//{{INIT_CONTROLS
//}}
//{{INIT_MENUS
//}}
//{{REGISTER_LISTENERS
//}}

Outside the constructor Frame1()

//{{DECLARE_CONTROLS
//}}
//{{DECLARE_MENUS
//}}

And others...

You need to put in the same place code in the good section.  Section in applet and frame1 are same in general.

Hope that it will help you... IF you have some others questions I'm around!

Regards,
Shogi



 


 

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now