You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

maXim

Trainee

  • "maXim" is male
  • "maXim" started this thread

Posts: 53

Date of registration: Jan 5th 2009

Location: Sesto Fiorentino, Florence (ITALY)

Occupation: design & development (HW, SW & FW)

Hobbies: chess, fly fishing, good wine and beautiful women!

  • Send private message

1

Tuesday, March 25th 2014, 4:09pm

Applet, how to make?

Hi All,

I have never produced an Applet in Jabaco, but now I need to do this ... not even from the examples that I found in the forum I could have understood how that would work... I tried as below I have written, but it does not work (the project name is 'test')...

into test.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Jabaco-Applet</title>
</head>
<body>
<APPLET ARCHIVE="test.jar" CODE="Applet1.class" WIDTH="400" HEIGHT="300">
<PARAM NAME="Compiler" VALUE="Jabaco">
<PARAM NAME="Name" VALUE="Dante">
<PARAM NAME="Surname" VALUE="Alighieri">
</APPLET>
</body>
</html>

into Module1.jsrc:
Public Applet1 As New Applet1
Public AppletViewer As New JFrame("AppletViewer")
Public Sub main(ByJava args() As String)
Dim myArgs() As String
myArgs = args
Call AppletViewer.add(Applet1)
Call Applet1.setVisible(True)
Call AppletViewer.setSize(Applet1.Width + 100, Applet1.Height + 150)
Call AppletViewer.setLocation(300, 150)
AppletViewer.Show()
AppletViewer.setDefaultCloseOperation(AppletViewer.EXIT_ON_CLOSE)
Applet1.init()
End Sub

into Applet1.jsrc:
Public Sub Applet_Initialize()
Label1.Caption = Parent.getParameter("Compiler")
Label2.Caption = Parent.getParameter("Name")
Label3.Caption = Parent.getParameter("Surname")
End Sub

... somebody can help me? ;(

Thanks...

This post has been edited 4 times, last edit by "maXim" (Mar 25th 2014, 4:30pm)


theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

2

Tuesday, March 25th 2014, 5:59pm

I have changed Applet1.jsrc to

Jabaco Source

1
2
3
4
5
Public Sub start()
  Label1.Caption = Parent.getParameter("Compiler")
  Label2.Caption = Parent.getParameter("Name")
  Label3.Caption = Parent.getParameter("Surname")
End Sub

So, I have changed "Applet_Initialize()" to "start()" and it works good for me.
You need to compile it and run it in a browser, otherwise it will not work.
And you have to write "start()" completely in lowercase. So not "Start()" or "START()".

Greatings
theuserbl

maXim

Trainee

  • "maXim" is male
  • "maXim" started this thread

Posts: 53

Date of registration: Jan 5th 2009

Location: Sesto Fiorentino, Florence (ITALY)

Occupation: design & development (HW, SW & FW)

Hobbies: chess, fly fishing, good wine and beautiful women!

  • Send private message

3

Tuesday, March 25th 2014, 7:42pm

Hi theuserbl,

You have solved a problem that haunted me for many days! :thumbsup:

Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o Thank You! 8o
... and Thank You, in all the languages ​​of the world! 8o


Rate this thread
WoltLab Burning Board