Urgent need of help with a chat application!

Hi,
I'm writing a Chat Application and I want to add Emoticon, I did so by adding buttons but I don't know how to send the gif to my JTextField and to my JTextArea.
Here is part of my code can someone can help me PLEASE!!!
JPanel chatPane = new JPanel(new BorderLayout());
JPanel emoticon = new JPanel(new GridLayout(2, 5));
b1 = new JButton (sourrire);
b1.setToolTipText("Un Sourire");
// b1.addActionListener();
emoticon.add(b1);
b2 = new JButton (gsourrire);
b2.setToolTipText("Un Grand Sourire");
// b2.addActionListener();
emoticon.add(b2);
b3 = new JButton (triste);
b3.setToolTipText("Triste");
// b3.addActionListener();
emoticon.add(b3);
b4 = new JButton (grimace);
b4.setToolTipText("Grimace");
// b4.addActionListener();
emoticon.add(b4);
b5 = new JButton (pleure);
b5.setToolTipText("Pleure");
// b5.addActionListener();
emoticon.add(b5);
b6 = new JButton (bec);
b6.setToolTipText("Un bec");
// b6.addActionListener();
emoticon.add(b6);
b7 = new JButton (coeur);
b7.setToolTipText("Un coeur pour toi");
// b7.addActionListener();
emoticon.add(b7);
b8 = new JButton (fache);
b8.setToolTipText("Fache");
// b8.addActionListener();
emoticon.add(b8);
b9 = new JButton (lunettes);
b9.setToolTipText("Je suis Cool");
// b9.addActionListener();
emoticon.add(b9);
b10 = new JButton (clinoeil);
b10.setToolTipText("Clin d'Oeil");
//b10.addActionListener(new ActionAdapter2());
emoticon.add(b10);
Thanks a lot!
Isabelle

Hi anoopjain13
what I did is that each button is an IconImage and I was trying to send the Icon to the textfield.
here is the complete code of my chat, you'll understand better what I tried to do.
//Naziha Berrassil et Isabelle Gosselin
//Travail Pratique #1
//remis � Said Senhaji
//Developpement d'une application CHAT
//package chatv2.a
import java.lang.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.*;
public class TCPChat2a implements Runnable {
// Constantes de l'etat de la connection
public final static int NULL = 0;
public final static int DISCONNECTED = 1;
public final static int DISCONNECTING = 2;
public final static int BEGIN_CONNECT = 3;
public final static int CONNECTED = 4;
// Declaration d'un tableau de chaines
public final static String statusMessages[] = {
" Erreur! Aucune connexion possible!", " Deconnexion",
" Deconnexion en cours...", " Connexion en cours...", " Connexion"
//Instentiation de la classe
public final static TCPChat2a tcpObj = new TCPChat2a();
// Indique la fin d'une session
public final static String END_CHAT_SESSION =
new Character((char)0).toString();
// Informations sur l'etat de la connexion
public static String hostIP = "localhost";
public static String user = "";
public static String s1;
public static int port = 1234;
public static int connectionStatus = DISCONNECTED;
public static boolean isHost = true;
public static String statusString = statusMessages[connectionStatus];
public static StringBuffer toAppend = new StringBuffer("");
public static StringBuffer toSend = new StringBuffer("");
// Declaration des composantes GUI et initialisation
public final static ImageIcon sourrire = new ImageIcon ("icons/sourrire.gif");
public static JButton b1;
public final static ImageIcon gsourrire = new ImageIcon ("icons/grand_sourrire.gif");
public static JButton b2;
public final static ImageIcon triste = new ImageIcon ("icons/triste.gif");
public static JButton b3;
public final static ImageIcon pleure = new ImageIcon ("icons/pleure.gif");
public static JButton b4;
public final static ImageIcon coeur = new ImageIcon ("icons/coeur.gif");
public static JButton b5;
public final static ImageIcon grimace = new ImageIcon ("icons/grimace.gif");
public static JButton b6;
public final static ImageIcon lunettes = new ImageIcon ("icons/lunettes.gif");
public static JButton b7;
public final static ImageIcon fache = new ImageIcon ("icons/fache.gif");
public static JButton b8;
public final static ImageIcon bec = new ImageIcon ("icons/bec.gif");
public static JButton b9;
public final static ImageIcon clinoeil = new ImageIcon ("icons/clinoeil.gif");
public static JButton b10;
public static JFrame mainFrame = null;
public static JTextArea chatText = null;
public static JTextField chatLine = null;
public static JPanel statusBar = null;
public static JLabel statusField = null;
public static JTextField statusColor = null;
public static JTextField ipField = null;
public static JTextField username = null;
public static JTextField portField = null;
public static JRadioButton hostOption = null;
public static JRadioButton guestOption = null;
public static JButton connectButton = null;
public static JButton disconnectButton = null;
// Declaration des composantes TCP
public static ServerSocket hostServer = null;
public static Socket socket = null;
public static BufferedReader in = null;
public static PrintWriter out = null;
//Methode qui retourne le premier pannel(optionsPane),ce dernier
//se compose de 5 panneaux
private static JPanel initOptionsPane() {
//pannel pane qui sera ajout� au pannel optionsPane
JPanel pane = null;
//initiation de la classe ActionAdapteur qui implemente ActionListner
ActionAdapter buttonListener = null;
// Creation du pannel optionsPane
JPanel optionsPane = new JPanel(new GridLayout(5, 1));
// 1er pannel pane pour label et textfield de l'adresse IP
pane = new JPanel(new FlowLayout(FlowLayout.RIGHT));
pane.add(new JLabel("Serveur IP:"));
ipField = new JTextField(10);
ipField.setBackground(new Color(0.98f, 0.97f, 0.85f));
ipField.setText(hostIP);
ipField.setEnabled(false);
//evenement generer par Component avec la methode addFocusListener
//en cas d'obtention ou perte du focus par un composant
ipField.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
ipField.selectAll();
//Editable seulement en mode deconnexion
if (connectionStatus != DISCONNECTED) {
changeStatusNTS(NULL, true);
else {
hostIP = ipField.getText();
pane.add(ipField);
optionsPane.add(pane);
// 2eme pannel pane pour label et textfield du port
pane = new JPanel(new FlowLayout(FlowLayout.RIGHT));
pane.add(new JLabel("Port:"));
portField = new JTextField(10);
portField.setBackground(new Color(0.98f, 0.97f, 0.85f));
portField.setEditable(true);
portField.setText((new Integer(port)).toString());
portField.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
//Textfield du port modifiable si on est en mode deconnexion
if (connectionStatus != DISCONNECTED) {
changeStatusNTS(NULL, true);
else {
int temp;
try {
temp = Integer.parseInt(portField.getText());
port = temp;
catch (NumberFormatException nfe) {
portField.setText((new Integer(port)).toString());
mainFrame.repaint();
pane.add(portField);
optionsPane.add(pane);
// 3eme pannel pour label et textfield du nom d'utilisateur
     pane = new JPanel(new FlowLayout(FlowLayout.RIGHT));
          pane.add(new JLabel("Nom: "));
          username = new JTextField(10);
username.setBackground(new Color(0.98f, 0.97f, 0.85f));
          username.setText(user);
          username.setEnabled(true);
          username.addFocusListener(new FocusAdapter() {
          public void focusLost(FocusEvent e) {
          // username.selectAll();
          // Should be editable only when disconnected
          if (connectionStatus != DISCONNECTED) {
          changeStatusNTS(NULL, true);
          else {
          user = username.getText();
          pane.add(username);
optionsPane.add(pane);
// Host/guest option
buttonListener = new ActionAdapter() {
public void actionPerformed(ActionEvent e) {
if (connectionStatus != DISCONNECTED) {
changeStatusNTS(NULL, true);
else {
isHost = e.getActionCommand().equals("host");
// Cannot supply host IP if host option is chosen
if (isHost) {
ipField.setEnabled(false);
ipField.setText("localhost");
hostIP = "localhost";
else {
ipField.setEnabled(true);
//creation de boutton groupe radio(serveur et invite)
ButtonGroup bg = new ButtonGroup();
hostOption = new JRadioButton("Serveur", true);
hostOption.setMnemonic(KeyEvent.VK_S);
hostOption.setActionCommand("host");
hostOption.addActionListener(buttonListener);
guestOption = new JRadioButton("Invite", false);
guestOption.setMnemonic(KeyEvent.VK_I);
guestOption.setActionCommand("invite");
guestOption.addActionListener(buttonListener);
bg.add(hostOption);
bg.add(guestOption);
// 4eme pannel pane pour les 2 bouttons radio
pane = new JPanel(new GridLayout(1, 2));
pane.add(hostOption);
pane.add(guestOption);
optionsPane.add(pane);
// 5eme pannel buttonPane pour les bouttons de connexion et deconnexion
JPanel buttonPane = new JPanel(new GridLayout(1, 2));
buttonListener = new ActionAdapter() {
public void actionPerformed(ActionEvent e) {
// requete pou debut d'une connexion
if (e.getActionCommand().equals("connect")) {
changeStatusNTS(BEGIN_CONNECT, true);
// Deconnexion
else {
changeStatusNTS(DISCONNECTING, true);
//creation des bouttons dans le pannel et l'ajout au premier pannel
//(optionsPane)
connectButton = new JButton("Connexion");
connectButton.setMnemonic(KeyEvent.VK_C);
connectButton.setActionCommand("connect");
connectButton.addActionListener(buttonListener);
connectButton.setEnabled(true);
disconnectButton = new JButton("Deconnexion");
disconnectButton.setMnemonic(KeyEvent.VK_D);
disconnectButton.setActionCommand("disconnect");
disconnectButton.addActionListener(buttonListener);
disconnectButton.setEnabled(false);
buttonPane.add(connectButton);
buttonPane.add(disconnectButton);
optionsPane.add(buttonPane);
return optionsPane;
// Initialisation de toutes les composantes GUI et affichage du frame
private static void initGUI() {
// Configuration du status bar
// cr�ation d'un autre pannel statusBar qui se compose d'un petit carr�
// color� et un label indiquant le mode de connexion
statusField = new JLabel(); //Label indiquant l'�tat de la connexion
statusField.setText(statusMessages[DISCONNECTED]);
statusColor = new JTextField(1); //carr� color� indiquant l'�tat de la connection grace a des couleurs
statusColor.setBackground(Color.red);
statusColor.setEditable(false);
statusBar = new JPanel(new BorderLayout());
statusBar.add(statusColor, BorderLayout.WEST);
statusBar.add(statusField, BorderLayout.CENTER);
// Configuration du pannel optionsPane en appelant la methode d'initiation
// de ce dernier
JPanel optionsPane = initOptionsPane();
// Creation et configuration du pannel chatPane qui contient un
// textarea au centre avec une barre defilante verticale et un textfield
// au sud pour faire rentrer les messages
JPanel chatPane = new JPanel(new BorderLayout());
     JPanel emoticon = new JPanel(new GridLayout(2, 5));
b1 = new JButton (sourrire);
b1.setToolTipText("Un Sourire");
// b1.addActionListener();
emoticon.add(b1);
b2 = new JButton (gsourrire);
b2.setToolTipText("Un Grand Sourire");
// b2.addActionListener();
emoticon.add(b2);
b3 = new JButton (triste);
b3.setToolTipText("Triste");
// b3.addActionListener();
emoticon.add(b3);
b4 = new JButton (grimace);
b4.setToolTipText("Grimace");
// b4.addActionListener();
emoticon.add(b4);
b5 = new JButton (pleure);
b5.setToolTipText("Pleure");
// b5.addActionListener();
emoticon.add(b5);
b6 = new JButton (bec);
b6.setToolTipText("Un bec");
// b6.addActionListener();
emoticon.add(b6);
b7 = new JButton (coeur);
b7.setToolTipText("Un coeur pour toi");
// b7.addActionListener();
emoticon.add(b7);
b8 = new JButton (fache);
b8.setToolTipText("Fache");
     // b8.addActionListener();
     emoticon.add(b8);
b9 = new JButton (lunettes);
b9.setToolTipText("Je suis Cool");
// b9.addActionListener();
emoticon.add(b9);
b10 = new JButton (clinoeil);
b10.setToolTipText("Clin d'Oeil");
//b10.addActionListener(new ActionAdapter2());
emoticon.add(b10);
emoticon.addActionListener(new ActionAdapter() {
public void actionPerformed(ActionEvent e) {
                         String image = chatLine.setImage().toString();
                         appendToChatBox(image);
                         chatLine.selectAll();
                         sendString(image)
                         chatLine.setText(" ");
emoticon.setVisible(true);
//b1 = setVisible(true);
chatText = new JTextArea(10, 100);
chatText.setBackground(new Color(0.98f, 0.97f, 0.85f));
chatText.setLineWrap(true);
chatText.setEditable(false);
chatText.setForeground(Color.blue);
JScrollPane chatTextPane = new JScrollPane(chatText,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
chatLine = new JTextField(10);
chatLine.setBackground(new Color(0.98f, 0.97f, 0.85f));
chatLine.setForeground(Color.blue);
chatLine.setEnabled(false);
chatLine.addActionListener(new ActionAdapter() {
public void actionPerformed(ActionEvent e) {
String s = chatLine.getText();
if (!s.equals("")) {
appendToChatBox(user=username.getText()+" dit : \n" + s + "\n");
chatLine.selectAll();
// Envoi de la chaine entr�e
sendString(s);
chatLine.setText("");
chatPane.add(chatLine, BorderLayout.SOUTH);
chatPane.add(chatTextPane, BorderLayout.NORTH);
chatPane.setPreferredSize(new Dimension(300, 300));
     chatPane.add(emoticon, BorderLayout.CENTER);
// Ajout des pannels dans le pannel principal (mainPane)
JPanel mainPane = new JPanel(new BorderLayout());
mainPane.add(statusBar, BorderLayout.SOUTH);
mainPane.add(optionsPane, BorderLayout.WEST);
mainPane.add(chatPane, BorderLayout.CENTER);
// Configuration du frame (mainFrame)
mainFrame = new JFrame("Chat");
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// la m�thode setDefaultCloseOperation(int)provient de la classe javax.swing.JDialog
     // Elle specifi l'op�ration qui sera ex�cut�e par d�fault lorsque
     // l'utilisateur initialisera une fermeture de session
mainFrame.setContentPane(mainPane);
mainFrame.setSize(mainFrame.getPreferredSize());
     // la m�thode getPreferredSize() provient de la classe java.awt
     // Retourne la grosseur "pr�f�r�e" du container.
mainFrame.setLocation(200, 200);
// la m�thode setLocation(double, double) provient de la classe java.awt.Point
     // elle permet de specifiez un emplacement d'un point a des coordonn�es de type Float
mainFrame.pack();
// la m�thode pack() provient de la class AWT.Window, elle permet a la fenetre
// d'�tre ajuster a la grosseur et a la mise en page des sous-composantes de celle-ci
mainFrame.setVisible(true);
// Le thread qui permet le changement des composantes GUI pendant le
// changement de l'etat
private static void changeStatusTS(int newConnectStatus, boolean noError) {
// Changer l'etat si valide
if (newConnectStatus != NULL) {
          connectionStatus = newConnectStatus;
// S'il n'y a aucunes erreur, afficher le bon message de l'etat
if (noError) {
statusString = statusMessages[connectionStatus];
// Autrement, afficher le message d'erreur
else {
statusString = statusMessages[NULL];
System.out.println("Echec lors de la connexion");
// Appel a la routine de run()(Runnable interface) sur la gestion des erreurs
// et la mise a jours des composantes GUI grace au thread
SwingUtilities.invokeLater(tcpObj);
// Le changement des composantes GUI sans aucun pendant le
// changement de l'etat
private static void changeStatusNTS(int newConnectStatus, boolean noError) {
// Changer l'etat si valide
if (newConnectStatus != NULL) {
connectionStatus = newConnectStatus;
// S'il n'y a aucunes erreur, afficher le bon message de l'etat
if (noError) {
statusString = statusMessages[connectionStatus];
// Autrement, afficher le message d'erreur
else {
statusString = statusMessages[NULL];
// Appel a la routine de run()(Runnable interface) sur la gestion des erreurs
// en utilisant le thread
tcpObj.run();
// L'ajout au chat box avec l'utilisation du Thread
private static void appendToChatBox(String s) {
synchronized (toAppend) {
toAppend.append(s);
System.out.println(s);
// Ajouter le text au "send-buffer"
private static void sendString(String s) {
synchronized (toSend) {
toSend.append(user=username.getText()+ " dit : \n" + s + "\n");
// Nettoyage pour le debranchement
private static void cleanUp() {
try {
if (hostServer != null) {
hostServer.close();
hostServer = null;
catch (IOException e) { hostServer = null; }
try {
if (socket != null) {
socket.close();
socket = null;
catch (IOException e) { socket = null; }
try {
if (in != null) {
in.close();
in = null;
catch (IOException e) { in = null; }
if (out != null) {
out.close();
out = null;
// Verification de l'etat courrant et ajustement de "enable/disable"
// en fonction de l'etat
public void run() {
switch (connectionStatus) {
case DISCONNECTED:
connectButton.setEnabled(true);
disconnectButton.setEnabled(false);
ipField.setEnabled(true);
portField.setEnabled(true);
username.setEnabled(true);
hostOption.setEnabled(true);
guestOption.setEnabled(true);
chatLine.setText("");
chatLine.setEnabled(false);
statusColor.setBackground(Color.red);
break;
case DISCONNECTING:
connectButton.setEnabled(false);
disconnectButton.setEnabled(false);
ipField.setEnabled(false);
portField.setEnabled(false);
hostOption.setEnabled(false);
guestOption.setEnabled(false);
chatLine.setEnabled(false);
statusColor.setBackground(Color.orange);
break;
case CONNECTED:
connectButton.setEnabled(false);
disconnectButton.setEnabled(true);
ipField.setEnabled(false);
portField.setEnabled(false);
hostOption.setEnabled(false);
username.setEnabled(false);
guestOption.setEnabled(false);
chatLine.setEnabled(true);
statusColor.setBackground(Color.green);
break;
case BEGIN_CONNECT:
connectButton.setEnabled(false);
disconnectButton.setEnabled(false);
ipField.setEnabled(false);
portField.setEnabled(false);
hostOption.setEnabled(false);
username.setEnabled(false);
guestOption.setEnabled(false);
chatLine.setEnabled(true);
chatLine.grabFocus();
statusColor.setBackground(Color.orange);
break;
// S'assurer que l'etat des champs bouton/texte sont consistent
// avec l'etat interne
ipField.setText(hostIP);
portField.setText((new Integer(port)).toString());
hostOption.setSelected(isHost);
guestOption.setSelected(!isHost);
statusField.setText(statusString);
chatText.append(toAppend.toString());
toAppend.setLength(0);
mainFrame.repaint();
// Procedure principale
public static void main(String args[]) {
String s;
initGUI();
while (true) {
try {
Thread.sleep(10);
     // Verification a toute les 10 ms
catch (InterruptedException e) {}
switch (connectionStatus) {
case BEGIN_CONNECT:
try {
// Essai de configuration du serveur si "host"
if(user != ""){
     if (isHost) {
     hostServer = new ServerSocket(port);
     socket = hostServer.accept();
     // Si invit�, essai de branchement au serveur
     else {
     socket = new Socket(hostIP, port);
in = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
out = new PrintWriter(socket.getOutputStream(), true);
changeStatusTS(CONNECTED, true);
System.out.println("Ouverture de la session: \n" + socket);
          else{
          JOptionPane.showMessageDialog(null, "Erreur, vous devez entrer un nom d'utilisateur", "Erreur", JOptionPane.PLAIN_MESSAGE);
                    changeStatusTS(DISCONNECTED, false);
// Si erreur, nettoyage et envoi du message d'erreur
catch (IOException e) {
cleanUp();
changeStatusTS(DISCONNECTED, false);
break;
case CONNECTED:
try {
// Envoi de data
if (toSend.length() != 0) {
out.print(toSend);
out.flush();
toSend.setLength(0);
changeStatusTS(NULL, true);
// Reception de data
if (in.ready()) {
s = in.readLine();
if ((s != null) && (s.length() != 0)) {
// Verification de la fin de la transmission
if (s.equals(END_CHAT_SESSION)) {
changeStatusTS(DISCONNECTING, true);
// Autrement, reception du texte
else {
appendToChatBox( s + "\n");
changeStatusTS(NULL, true);
catch (IOException e) {
cleanUp();
changeStatusTS(DISCONNECTED, false);
break;
case DISCONNECTING:
// Dis aux autres fenetre de chat de se d�brancher aussi
out.print(END_CHAT_SESSION);
out.flush();
               System.out.println("Fermeture de la session");
// Nettoyage (ferme les streams/sockets)
cleanUp();
changeStatusTS(DISCONNECTED, true);
break;
default: break; // ne fait rien
// Certaines interfaces �couteurs sont accompagn�es d'adaptateurs qui
//implementent toutes les methodes de l'interface et evitent de les lister.
class ActionAdapter implements ActionListener {
public void actionPerformed(ActionEvent e) {}
////////////////////////////////////////////////////////////////////

Similar Messages

  • I've just came on board from Andriod and need massive help with the Contacts application any one out there willing to help the 'noob'?

    I had the folks at the store port over all of my contacts from my old
    ratty Andriod phone to my new shiny iPhone.
    however all 200+ of my contacts sort of "shook" out,
    meaning say John Smith, on my old phone,
    had in my contacts the following:
    John Smith
    123 Main St. Anytown, Anystate USA
    555-826-4879 home
    555-799-4247 cell
    [email protected]
    johnsmith@facebook
    all nice and neat on my andriod but when it ported over
    all that information was just scattered all over my contacts sort of like:
    john smith, smith john
    john smith 123 main st. etc.
    johhn smith home 555 etc.
    john smith cell 555 etc.
    john smith johnsmith@ etc.
    etc.
    so for all those 200+ contacts in my phone, I've got a zillion of them now...
    so I'd like to get this all back in order before I and Siri explode.
    I know nothing, and I know even less about outlook and the sort.
    But I do know I am in Dire need of help with this... I figured that eveything else
    involving iphones and apple in general was supposed to be cake but it seems
    like this is the only thing that isn't cake at all... unless, I'm just a right idiot. (which is possible, hence spelling and grammatical issues).

    I believe I've tried to sync it with google, but it didn't seem to take
    muchless take my calender. it seems to favor my facebook calender
    more over my google calender, but Siri seems to be helping me re-write
    it...but that's not the game here, it's the contacts. I've tried to export
    the cvp (??) list and import it into my iTunes account. However, It only
    doubled my issue because it didn't over write my existing contacts.

  • Urgently need some help with a few Swing questions

    Hi
    I'm hoping someone can help me, I need to get these problems fixed very soon or I'm in trouble.
    Scenario: I have a JTreeTable inside a JScrollPane inside a JPanel that is inside a JFrame.
    Problems I'm having (solutions or help with any of all would be greatly appreciated):
    1. I'm trying to make it possible to do a selection in the JTreeTable by right-clicking the mouse (as well as the normal left click), but only if there is nothing currently selected, so I do something like this:
            int[] sel = treeTable.getSelectedRows();
            if ((sel == null) || (sel.length == 0)) {
                treeTable.setColumnSelectionAllowed(false);
                treeTable.setRowSelectionAllowed(true);
                treeTable.setRowSelectionInterval(0, 0);            // but I don't know what these values should be set to, where to get them from?
            }I want to select the row at the mouse cursor, I have the x/y values but I don't know how to relate them to the row index. The full feature that I require is I need
    2. I have a popup menu that appears after a right click on the JTreeTable, it's handled by a MouseListener attached to the JTreeTable, I want this to also appear anywhere else in the JScrollpane. I've tried moving the MouseListener to the JScrollPane, but then the popup stops working if user clicks inside JTreeTable, if I add it to both, it almost works, except that user cannot click below the JTreeTable's first column. Any ideas on this?
    3. How can I change the JTreeTable selection behaviour so that you can only multi-select using Ctrl/Shift and not the mouse? Mouse must only allow single connection, I'm currently using:
    treeTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);But this allows mouse drag selection as well, which shouldn't be there. How is this avoidable?
    4. I want to make the minimize button to make an icon in system tray and be able to restore it by clicking on it. Also I want to be able to minimze from a popup menu, I've currently got the following:
            thisApp.getMainFrame().setState(Frame.ICONIFIED);
            thisApp.getMainFrame().setVisible(false);
            thisApp.getMainFrame().pack();
            try {
               tray.add(trayIcon);
            } catch (AWTException ex) {
            }thisApp is a copy of the SingleFrameApplication variable that is passed to the main frame constructor (main frame extends FrameView). This code above doesn't do anything except create the tray icon. If I click on the tray icon (code below) then it opens up a blank window:
            trayIcon.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    thisApp.getMainFrame().setVisible(true);
                    thisApp.getMainFrame().setState(Frame.NORMAL);
                    thisApp.getMainFrame().pack();
                    tray.remove(trayIcon);
            });I need to get this part fixed and I optionally also want to bind this behaviour to the normal minimize button.
    Please, please help!
    Lionel

    Issue 2 has been solved, was an error in the MouseListener code.

  • Urgent need of help with a java WSDL application

    Hello,
    I'm trying to turn a WORKING java application which uses some webservices, into a JAR file.
    Somehow i keep on getting the same errors all the time.
    I added all the necessary jar files, which are used in the program, in the global JAR file, but still the error remains.
    Can anyone help me with this error? (Error see below, WARNING EXTREMELY LONG!)
    ---------------------------------------------------------------- ERROR MESSAGE --------------------------------------------------------------------
    standard type mapping initialization error: javax.xml.rpc.JAXRPCException: javax
    .xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.mes
    saging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at test.proxy.runtime.RegistrationWS_Service_SerializerRegistry.getRegis
    try(RegistrationWS_Service_SerializerRegistry.java:26)
    at test.proxy.runtime.RegistrationWS_Service_Impl.<init>(RegistrationWS_
    Service_Impl.java:26)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1300)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at test.Main.test(Main.java:21)
    at test.Main.<init>(Main.java:10)
    at test.Main.main(Main.java:14)
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at test.proxy.runtime.RegistrationWS_Service_SerializerRegistry.getRegis
    try(RegistrationWS_Service_SerializerRegistry.java:26)
    at test.proxy.runtime.RegistrationWS_Service_Impl.<init>(RegistrationWS_
    Service_Impl.java:26)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1300)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at test.Main.test(Main.java:21)
    at test.Main.<init>(Main.java:10)
    at test.Main.main(Main.java:14)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 10 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 13 more
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at test.proxy.runtime.RegistrationWS_Service_SerializerRegistry.getRegis
    try(RegistrationWS_Service_SerializerRegistry.java:26)
    at test.proxy.runtime.RegistrationWS_Service_Impl.<init>(RegistrationWS_
    Service_Impl.java:26)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1300)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at test.Main.test(Main.java:21)
    at test.Main.<init>(Main.java:10)
    at test.Main.main(Main.java:14)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 10 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 13 more
    ---------------------------------------------------------------- ERROR MESSAGE --------------------------------------------------------------------

    I face this same problem too, I have a jar which calls a webservice and I want to execute it from windows command , I get the following error when I use the command : java -cp Has.jar moicr.Main
    standard type mapping initialization error: javax.xml.rpc.JAXRPCException: javax
    .xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.mes
    saging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 18 more
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    C:\>

  • Need some help with the chat feature

    Have a school that upgraded to ARD 3 admin and all clients (10.4.x and ARD client 3.1). He can observe clients (teachers) without problems and can chat with them. When he tries to do that to a lab machine that students log into (with network homes), he can observe, control, etc. But when he tries to chat, get the "error communicating with <mac name>". The students are in a group that has managed prefs to the extent that he doesn't allow certain apps to run in the lab, i.e. iTunes, IE, Addressbook, etc. When he moves the student out of the group, ARD chat works. We even set up a test group with one student in it, same thing.
    Any ideas?
    TIA,
    Marc

    You might need to add the application "Remote Desktop Message" as one of the apps that is allowed to run. It is located in /System/Library/CoreServices/RemoteMangement/ARDAgent/Contents/Support.

  • Need some help with my Air Application

    Hello Friends
    I am developing a desktop application which have few modules from flex and few from HTML-Perl based existing application.
    I am using <mx:Html> component for showing that HTML-Perl Application.
    That application is running fine inside <mx:Html> but when we reach to the last step of the application which has payment integrated with other website.
    It sends the request but never gives back the response from the other website.
    To make it clear you can assume its a shopping website wrapped inside Air Applicaion with <mx:Html> componenet and we make a call to payment portal like paypal or other the response never comes back.
    Can you guys tell me what could be the issue?
    Regards
    Harpreet

    So if i am understanding correctly once the J button ("Donate 10") ios clicked you want it to call the program. What i suggest is using the action listner on that button and inside action performed class have it call the program. somthing like this
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    SMSObject send;
    JButton b1 = new JButton("Donate 10", leftButtonIcon);
    b1.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
    send = new SMSObject(param)
    send.run();
    Basically create a vararible of the type SMSObjest, add an actionlistner to the button and inside the actionperformed call the method

  • I need help with a VB Application

    I need help with building an application and I am on a tight deadline.  Below I have included the specifics for what I need the application to do as well as the code that I have completed so far.  I am having trouble getting the data input into
    the text fields to save to a .txt file.  Also, I need validation to ensure that the values entered into the text fields coincide with the field type.  I am new to VB so please be gentle.  Any help would be appreciated.  Thanx
    •I need to use the OpenFileDialog and SaveFileDialog in my application.
    •Also, I need to use a structure.
    1. The application needs to prompt the user to enter the file name on Form_Load.
    2. Also, the app needs to use the AppendText method to write the Employee Data to the text file. My project should allow me to write multiple Employee Data to the same text file.  The data should be written to the text file in the following format (comma
    delimited)
    FirstName, MiddleName, LastName, EmployeeNumber, Department, Telephone, Extension, Email
    3. The Department dropdown menu DropDownStyle property should be set so that the user cannot enter inputs that are not in the menu.
    Public Class Form1
    Dim filename As String
    Dim oFile As System.IO.File
    Dim oWrite As System.IO.StreamWriter
    Dim openFileDialog1 As New OpenFileDialog()
    Dim fileLocation As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    openFileDialog1.InitialDirectory = "c:\"
    openFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
    openFileDialog1.FilterIndex = 1
    openFileDialog1.RestoreDirectory = True
    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    fileLocation = openFileDialog1.FileName
    End If
    'filename = InputBox("Enter output file name")
    'oWrite = oFile.CreateText(filename)
    cobDepartment.Items.Add("Accounting")
    cobDepartment.Items.Add("Administration")
    cobDepartment.Items.Add("Marketing")
    cobDepartment.Items.Add("MIS")
    cobDepartment.Items.Add("Sales")
    End Sub
    Private Sub btnSave_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    'oWrite.WriteLine("Write e file")
    oWrite.WriteLine("{0,10}{1,10}{2,10}{3,10}{4,10}{5,10}{6,10}{7,10}", txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, txtEmployee.Text, cobDepartment.SelectedText, txtTelephone.Text, txtExtension.Text, txtEmail.Text)
    oWrite.WriteLine()
    End Sub
    Private Sub btnExit_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    oWrite.Close()
    End
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtFirstname.Text = ""
    txtMiddlename.Text = ""
    txtLastname.Text = ""
    txtEmployee.Text = ""
    txtTelephone.Text = ""
    txtExtension.Text = ""
    txtEmail.Text = ""
    cobDepartment.SelectedText = ""
    End Sub
    End Class

    Hi Mikey81,
    Your issue is about VB programming, so Visual Basic forum is a better forum for your case. I moved this thread there,
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help with a small application

    Hi all, I please need help with a small application that I need to do for a homework assignment.
    Here is what I need to do:
    "Write an application that creates a frame with one button.
    Every time the button is clicked, the button must be changed
    to a random color."
    I already coded a part of the application, but I don't know what to do further.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ColourButton extends JFrame {
         JButton button = new JButton("Change Colour");
         public ColourButton() {
              super ("Colour Button");
              setSize(250, 150);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel = new JPanel();
              panel.add(button);
              add(panel);
              setVisible(true);
         public static void main(String[] args) {
              ColourButton cb = new ColourButton();
    }The thing is I'm not sure what Event Listener I have to implement and use as well as how to get the button to change to a random color everytime the button is clicked.
    Can anyone please help me with this.
    Thanks.

    The listener:
    Read this: [http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]
    The random color:
    [Google this|http://www.google.com/search?q=color+random+java]

  • I need help with the Web Application Certificate

    Greets,
    The title says it all really. I need help with the Web Application Certificate.
    I've followed the instructions from here:
    https://www.novell.com/documentation....html#b13qz9rn
    I can get as far as item 3.c
    3. Getting Your Certificate Officially Signed
    C. Select the self-signed certificate, then click File > Certification Request > Import CA Reply.
    I can get the certificate in to the Filr appliance but from there I'm stuck.
    Any help much appreciated.

    Originally Posted by bentinker
    Greets,
    The title says it all really. I need help with the Web Application Certificate.
    I've followed the instructions from here:
    https://www.novell.com/documentation....html#b13qz9rn
    I can get as far as item 3.c
    ok when you have you self signed certificate and you requested an official certificate with the corresponding CSR then you just need to go back to the digital certificates console. To import the official certificate, select the self signed certificate, then click File > Certification Request > Import CA Reply. Then a new windows pops out to select the certificate from your trusted authority from your local hard disk. Find the file (.cer worked for me) and click ok. As soon as you do this in the digital certificates console the self signed certificate will change the information that now it is officially signed. Look at the second column and you should see the name of your trusted authority under "issue from"
    I personally had a lot of issues across all platforms. Especially Firefox and Chrome for android. Needed to pack all the root cert, intermediate cert and signed cert into one file and import as CA reply. Not even sure if this is correct now. But at least it works.

  • I'm suddenly in need of help with my Firefox browser (6.0.2)

    Hi there,
    I'm suddenly in need of help with my Firefox browser (6.0.2)
    (OS: I use Windows XP).
    When I open up the browser, all I see is a completely blank white screen, with all the toolbars at the top.
    I know that my physical connections are fine: I've tested the modem, turned the pc off and on etc. and I can also receive/send emails.
    This problem started today, 8th September, 2011 and has never happened before.
    Is it a coincidence that Firefox updated itself just before I logged off yesterday evening? Could it be something to do with this particular new update?
    I've also noted that just before I "open up" Firefox, I now get a small box saying:
    [JAVASCRIPT APPLICATION]
    Exc In Ev handl: TypeError: This oRoot.enable is not a function
    This has never appeared before - I hope it offers a clue a to what is wrong.
    The Browser is not stuck in Safe Mode, by the way.
    Obviously, I can't search for any solutions to the problem on the internet, as I can't physically see any websites!
    (A friend is sending this query on my behalf from their pc)
    Any light you could throw on this confusing problem would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.
    If the only option is to uninstall Firefox and reinstall it from your site, then I'm also in trouble (I can't see the internet or make any downloads).
    In that case, would you be able to send the .exe file as an attachment to my email address? If so, please let me know and I'll give you further details.
    Many thanks in advance.

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Need some help with MDX formula

    Hello, I am not finding any good documentation on MDX formulas, there is a specific one that I need some help with....could someone please elaborate what exactly does this formula mean? thanks.
    (MEASURES.[SIGNEDDATA],
    CLOSINGPERIOD([%TIMEDIM%].
    [%TIMEBASELEVEL%]))

    If new MEASURE gets added to Measure's table , in BPC Client , etools->client Options-> Refresh Dimensions should get the new measure into the CurrentView .IF not try  etools->client Options-> Clear Local application information .
    Formula 2 : 
    (MEASURES.SIGNEDDATA,
    CLOSINGPERIOD(%TIMEDIM%.
    %TIMEBASELEVEL%))
    This formula is used to retrieve AST & LEQ account values.
    If current time member is at monthlevel ,ie  ClosingPeriod of  2011.FEB is  the current member it self ,and would retrieve 2011.FEB value.
    If Current time member is at quarter level then ClosingPeriod of 2011.Q1 is 2011.Mar  ,and would retrieve 2011.MAR value.
    If Current time member is at year level then ClosingPeriod of 2011.TOTAL is 2011.DEC  ,and would retrieve 2011.DEC value.
    Formula 1 :
    MEASURES.SIGNEDDATA
    Irrespective of the level of the Time , MEASURES.SIGNEDDATA would retrieve current Time member value.This formula is used to retrieve INC & EXP account values
    if current time member is at month level,2011.FEB , 2011.FEB value is retrieved.
    if current time member is at quarter level,2011.Q1 , 2011.Q1(JANFEBMAR)  value is retrieved.
    if current time  member is at year level,2011.TOTAL , 2011.TOTAL(JAN,FEB,....,DEC)  value is retrieved.
    Hope this helps.

  • Need ugent help with APC and ICW

    We are upgrading our Inventory and Engineering Applications to 11.5.9 to implement APC. I needed some help with the Item Creation Workflow that is shipped with APC. If someone has extensive experience with this, please send me an email-id to which I can send my questions. Any help is greately appreciated.

    thanks for the response. It is a USR ring.
    On the sonet ring we have 8 ONS 15454 boxes. They have 1 central site and 7 remote sites. Mojority of the Circuits go from the central site to the remote sites. Only a few circuits (STS) go from a so called remote site to a remote site. Also, we have 6500 hooked up behind every ONS box that does the routing. Is this an optinal design??

  • I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980's and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my

    I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980’s and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my own folder and file naming conventions. I currently have over 23,000 images of which around 60% are scans going back 75 years.  Since I keep a copy of the originals, the storage requirements for over 46,000 images is huge.  180GB plus.
    I now have a Macbook Pro and will add an iMac when the new models arrive.  For my photos, I want to stay with Photoshop which also gives me the Bridge.  The only obvious reason to use iPhoto is to take advantage of Faces and the link to iMovie to make slideshows.  What am I missing and is using iPhoto worth the effort?
    If I choose to use iPhoto, I am not certain whether I need to load the originals and the edited versions. I suspect that just the latter is sufficient.  If I set PhotoShop as my external editor, I presume that iPhoto will keep track of all changes moving forward.  However, over 23,000 images in iPhoto makes me twitchy and they are appear hidden within iPhoto.  In the past, I have experienced syncing problems with, and database errors in, large databases.  If I break up the images into a number of projects, I loose the value of Faces reaching back over time.
    Some guidance and insight would be appreciated.  I have a number of Faces questions which I will save for later. 

    Bridge and Photoshop is a common file-based management system. (Not sure why you'd have used ACDSEE as well as Bridge.) In any event, it's on the way out. You won't be using it in 5 years time.
    Up to this the lack of processing power on your computer left no choice but to organise this way. But file based organisation is as sensible as organising a Shoe Warehouse based on the colour of the boxes. It's also ultimately data-destructive.
    Modern systems are Database driven. Files are managed, Images imported, virtual versions, lossless processing and unlimited editing are the way forward.
    For a Photographer Photoshop is overkill. It's an enormously powerful app, a staple of the Graphic Designers' trade. A Photographer uses maybe 15% to 20% of its capability.
    Apps like iPhoto, Lightroom, Aperture are the way forward - for photographers. There's the 20% of Photoshop that shooters actually use, coupled with management and lossless processing. Pop over to the Aperture or Lightroom forums (on the Adobe site) and one comment shows up over and over again... "Since I started using Aperture/ Lightroom I hardly ever use Photoshop any more..." and if there is a job that these apps can do, then the (much) cheaper Elements will do it.
    The change is not easy though, especially if you have a long-standing and well thought out filing system of your own. The first thing I would strongly advise is that you experiment before making any decisions. So I would create a Library, import 300 or 400 shots and play. You might as well do this in iPhoto to begin with - though if you’re a serious hobbyist or a Pro then you'll find yourself looking further afield pretty soon. iPhoto is good for the family snapper, taking shots at birthdays and sharing them with friends and family.
    Next: If you're going to successfully use these apps you need to make a leap: Your files are not your Photos.
    The illustration I use is as follows: In my iTunes Library I have a file called 'Let_it_Be_The_Beatles.mp3'. So what is that, exactly? It's not the song. The Beatles never wrote an mp3. They wrote a tune and lyrics. They recorded it and a copy of that recording is stored in the mp3 file. So the file is just a container for the recording. That container is designed in a specific way attuned to the characteristics and requirements of the data. Hence, mp3.
    Similarly, that Jpeg is not your photo, it's a container designed to hold that kind of data. iPhoto is all about the data and not about the container. So, regardless of where you choose to store the file, iPhoto will manage the photo, edit the photo, add metadata to the Photo but never touch the file. If you choose to export - unless you specifically choose to export the original - iPhoto will export the Photo into a new container - a new file containing the photo.
    When you process an image in iPhoto the file is never touched, instead your decisions are recorded in the database. When you view the image then the Master is presented with these decisions applied to it. That's why it's lossless. You can also have multiple versions and waste no disk space because they are all just listings in the database.
    These apps replace the Finder (File Browser) for managing your Photos. They become the Go-To app for anything to do with your photos. They replace Bridge too as they become a front-end for Photoshop.
    So, want to use a photo for something - Export it. Choose the format, size and quality you want and there it is. If you're emailing, uploading to websites then these apps have a "good enough for most things" version called the Preview - this will be missing some metadata.
    So it's a big change from a file-based to Photo-based management, from editing files to processing Photos and it's worth thinking it through before you decide.

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • Need some help with a Macally enclosure and a spare internal drive

    Need some help with a Macally enclousure
    Posted: Oct 1, 2010 10:55 AM
    Reply Email
    Aloha:
    I have a Macally PHR-S100SUA enclousure that does not recognise,my WD 1001fals hard drive. It has worked just fine with other internal drives, but not this one?
    This is a spare internal drive that I am trying to make an external drive to store back ups for a lot of data. But so far I can not get it recognized by the computer. Maybe I need different drivers?
    Any suggestions?
    Dan Page

    Hi-
    Drivers aren't typically needed for external enclosures.
    Macally has none listed for that enclosure.
    The same is true for the WD drive, internal or external; no drivers.
    With the exception of high end PM multi drive enclosures, I can't think of any that use drivers.
    How is the external connected?
    Have you tried different cables, different ports?
    Bad/damaged cables are fairly common.
    Have you verified connections inside of the enclosure?

Maybe you are looking for

  • MacPro in Canada Needs More Ram...

    Yes, I'm here in Canada. I'm wanting to add more memory to the stock 1GB that came with my MP. There arent alot of options for shopping, therefore I've turned to two sites. OWC and Ramjet. Which in your opinion is the better of the two? They both see

  • Mac address table corruption?

    We are running Cisco 4500 chassis at the access layer, and have been for a few years without issue. Recently we started to experience issues where a mac address will just randomly "jump" to another port. User will call us and say their computer is no

  • Bevel effect bug.

    To some you, this is going to look like a trivial matter. For those of us designing detailed multi-buttoned GUI's, it isn't. Yes, there are time consuming work-arounds. But why?...when it could be fixed by Adobe? This first pic shows the starting poi

  • Troubles with the type associations

    Hello forum, The type and extension association is really delicious, it's time this happens! I've been trying it with moderate success, here are a few experiences, I would love advice for better results: - first the example at http://java.sun.com/jav

  • Transport Vendor Rate Contract

    Hi, We need to develop system in our company is as under. We have transport vendor and we are doing Rate contract with Transport vendor (Destination wise)  then taking approval from authorize person, after approval we are issung lette in word. once a