```
    JLabel x_label = new JLabel("");
    x_label.setHorizontalAlignment(SwingConstants.CENTER);
    x_label.addMouseListener(simple_widget);
    x_label.setText(simple_widget.stringInfo);
    info_panel.add(x_label);

```

I am having trouble displaying the x,y coordinates of the mouse on a JLabel. Above is my label and below is the mouse widget. x\_label.setText(simple\_widget.stringInfo); does not seem to work in displaying the coordinates.

```
private FrameView frame_view;
public String stringInfo;

public SimpleFrameViewWidget(Frame f) {
    setLayout(new BorderLayout());

    frame_view = new FrameView(f);
    frame_view.addMouseListener(this);
    add(frame_view, BorderLayout.CENTER);

    JLabel title_label = new JLabel(f.getTitle());
    add(title_label, BorderLayout.SOUTH);
}

@Override
public void mouseClicked(MouseEvent e) {
    int x = e.getX();
    int y = e.getY();

    String stringInfo = "X: " + x + "Y: " + y;
}

```