Modify ChatFrame UI by adding a table on MAC

Goal:

add a 2X2 table to IM box the box where you type messages to other user.

Approach:

I have been using the following document:

http://www.igniterealtime.org/builds/sparkplug_kit/docs/latest/sparkplug_dev_gui de.html#examples

However, the first half of document is unclear.

Under "Getting Started Writing Pluggings, I added the jar files as told.

This allowed me to write following code for plugin.

But, it doesn’t show up in IM box where you type to other user

Plugin Code:

import java.awt.Color;

import java.awt.GridLayout;

import javax.swing.JFrame;

import javax.swing.JPanel;

import javax.swing.JTable;

import org.jivesoftware.spark.ChatManager;

import org.jivesoftware.spark.SparkManager;

import org.jivesoftware.spark.plugin.Plugin;

public class Table implements Plugin{

@Override

public boolean canShutDown() {

// TODO Auto-generated method stub

return false;

}

@Override

public void initialize() {

// TODO Auto-generated method stub

addTable();

}

@Override

public void shutdown() {

// TODO Auto-generated method stub

}

@Override

public void uninstall() {

// TODO Auto-generated method stub

}

private void addTable()

{

//Retrieve a ChatManager from SparkManager

ChatManager chatManager = SparkManager.getChatManager();

//JPanel window = new JPanel();

//window.setBackground(Color.cyan);

//window.setSize(100, 100);

JTable table = new JTable(2,2);

table.setBackground(Color.YELLOW);

/*JFrame frame = new JFrame();

frame.getContentPane();

frame.setLayout(new GridLayout(1,2));

frame.add(table);

frame.setBounds(100, 100,300,300);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setVisible(true);*/

String chatroom = chatManager.getChatRoom(“testuser2”).toString();

chatManager.getChatRoom(chatroom).add(table);

}

}

Any help appreciated

Thanks

Or am I supposed to use the following links???

http://www.ai.sri.com/~spark/eclipse/doc/spark-ide-install.html

http://www.ai.sri.com/~spark/eclipse/doc/spark-ide-user-guide.html#sparkperspect ive

Don’t think this will work since it is outdated version…

Any suggestions?

So apparently the link on the website are outdated…

Do not download the zip file and try to build a plugin.

http://www.igniterealtime.org/projects/spark/sparkplug-kit.jsp