Question: ```
import java.awt.*;
import java.net.URL;

import javax.imageio.ImageIO;
import javax.swing.*;

public class MainClass extends JFrame {

public static void main(String[] args){

    JFrame myframe = new JFrame("Mein Programm");
    myframe.setSize(600, 400);
    myframe.setVisible(true);
    myframe.add(new JLabel("Label"));

  }

}

```

I try to make a simple java program and I don´t know how to change the java cup icon. I tried several threads from the forum and all of them don´t work for me. 
Thanks for help.

Answer: 
You want to make a subroutine call (`$code_ref->(...)`), but you want to call a method. That means you'll have to create a subroutine that calls the method, and get a reference to that subroutine instead. As the following shows, this is quite easy to do:

```
my $code_ref = sub { Hello->hello(@_) };

```
If you're using this for a dispatch table, let the table do the heavy lifting by passing in a key instead of creating a generic cref and telling it which class to call the sub from:

```
use warnings;
use strict;

package Hello;
sub hello {
    my $class = shift;
    my $msg = shift;
    print "$msg\n";
}

package Bye;
sub bye {
    my $class = shift;
    my $msg = shift;
    print "$msg\n";
}

package main;

my %dt = (
    Hello => sub { Hello->hello(@_); },
    Bye => sub { Bye->bye(@_); },
);

$dt{Hello}->("hi there");
$dt{Bye}->("see ya!");

```