(javax.swing.JOptionPane/showMessageDialog nil "Hello World") #### use Inline ( Java => 'STUDY', STUDY => ['javax.swing.JOptionPane'] ); javax::swing::JOptionPane->showMessageDialog("Hello World"); #### In method showMessageDialog of class javax::swing::JOptionPane: Can't find any signature that matches the arguments passed (Hello World). Available signatures are: static showMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int) error was: Wrong number of arguments at C:/strawberry/perl/site/lib/Inline/Java/Object.pm line 107 static showMessageDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon) error was: Wrong number of arguments at C:/strawberry/perl/site/lib/Inline/Java/Object.pm line 107 static showMessageDialog(java.awt.Component, java.lang.Object) error was: Wrong number of arguments at C:/strawberry/perl/site/lib/Inline/Java/Object.pm line 107 at C:\Users\thequietcenter\prg\tmp\inline\try2.pl line 6 #### package start; /* * HelloWorldSwing.java requires no other files. */ import javax.swing.*; public class HelloWorldSwing { /** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread. */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("HelloWorldSwing"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Add the ubiquitous "Hello World" label. JLabel label = new JLabel("Hello World"); frame.getContentPane().add(label); //Display the window. frame.pack(); frame.setVisible(true); } public static void main(String[] args) { //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } } #### use Inline ( Java => 'STUDY', STUDY => [ qw(javax.swing.JFrame javax.swing.JLabel java.awt.Container) ] ); my $f = javax::swing::JFrame->new; my $l = javax::swing::JLabel->new("Hello World"); $f->getContentPane->add($l); $f->pack; #$f->setVisible #### Can't call method 'add' on an object (Inline::Java::Object) that is not bound to Perl at C:\Users\thequietcenter\prg\tmp\inline\try2.pl line 13