I\'ve been working on creating a chat client(java swing) and I\'ve just made my emoticons fully useable but other than having users type \":)\" for example, I want to provid
In the absence of more information, I assume that what you are really after is a window which appears without window decorations (i.e. borders and title bar) and which does not show in the task bar. I therefore suggest you look at the JWindow documentation, which does exactly this.
This ListPanel might be a useful, as the DefaultListCellRenderer
can display an Icon
.
Icon icon = UIManager.getIcon("html.pendingImage");
...
@Override
public Component getListCellRendererComponent(JList list, Object
value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(
list, value, index, isSelected, cellHasFocus);
label.setBorder(BorderFactory.createEmptyBorder(N, N, N, N));
label.setIcon(icon);
label.setHorizontalTextPosition(JLabel.CENTER);
label.setVerticalTextPosition(JLabel.BOTTOM);
return label;
}
I suppose you mean a chat window like this sort. In that case, you'll need to learn how to layer components over one another, in this case a jPanel, or a jLayeredPane nested inside the main jFrame.