Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
| Search | Today's Posts | Mark Forums Read
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2008, 07:27 AM
Registered User
 
Join Date: Jan 2008
Location: chennai, Tamilnadu, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML GUI for java

Hi,
I want to display the output in an HTML form instead of displaying in terminal.The following code Compiles and run well.
Code:
import org.asteriskjava.live.AsteriskServer;
import org.asteriskjava.live.AsteriskChannel;
import org.asteriskjava.live.AsteriskQueue;
import org.asteriskjava.live.MeetMeRoom;
import org.asteriskjava.live.DefaultAsteriskServer;
import org.asteriskjava.live.ManagerCommunicationException;
public class HelloLive
{
    private AsteriskServer asteriskServer;
    public HelloLive()
    {
        asteriskServer = new DefaultAsteriskServer("localhost", "manager", "pa55w0rd");
    }
    public void run() throws ManagerCommunicationException
    {
        for (AsteriskChannel asteriskChannel : asteriskServer.getChannels())
        {
            System.out.println(asteriskChannel);
        }
        for (AsteriskQueue asteriskQueue : asteriskServer.getQueues())
        {
            System.out.println(asteriskQueue);
        }
        for (MeetMeRoom meetMeRoom : asteriskServer.getMeetMeRooms())
        {
            System.out.println(meetMeRoom);
        }
    }
    public static void main(String[] args) throws Exception
    {
        HelloLive helloLive = new HelloLive();
        helloLive.run();
    }
}
If i run this program,I am getting the output in a terminal.Instead of that I need to display the output in an html form.Is it possible?if yes, please help me to do.The output displayed in the terminal is:
 
Quote:
quote:
Quote:

Jan 28, 2008 11:12:58 AM org.asteriskjava.manager.internal.ManagerConnectio nImpl connect
INFO: Connecting to localhost:5038
Jan 28, 2008 11:12:58 AM org.asteriskjava.manager.internal.ManagerConnectio nImpl setProtocolIdentifier
INFO: Connected via Asterisk Call Manager/1.0
Jan 28, 2008 11:12:58 AM org.asteriskjava.manager.internal.ManagerConnectio nImpl doLogin
INFO: Successfully logged in
Jan 28, 2008 11:12:59 AM org.asteriskjava.manager.internal.ManagerConnectio nImpl doLogin
INFO: Determined Asterisk version: Asterisk 1.2
Jan 28, 2008 11:12:59 AM org.asteriskjava.live.internal.ChannelManager handleStatusEvent
INFO: Adding new channel SIP/outbound-08dbb658
Jan 28, 2008 11:12:59 AM org.asteriskjava.live.internal.ChannelManager handleStatusEvent
INFO: Adding new channel SIP/5101-08db8628
Jan 28, 2008 11:12:59 AM org.asteriskjava.live.internal.AsteriskServerImpl initializeIfNeeded
INFO: Initializing done
AsteriskChannel[id='1201498975.8',name='SIP/5101-08db8628',callerId='"5101" <5101>',state='RING',account='null',dateOfCreation =Mon Jan 28 11:12:55 IST 2008,dialedChannel=null,dialingChannel=null,linked Channel=null]
AsteriskChannel[id='1201498975.9',name='SIP/outbound-08dbb658',callerId='<12127773456>',state='DOWN',ac count='null',dateOfCreation=Mon Jan 28 11:12:59 IST 2008,dialedChannel=null,dialingChannel=null,linked Channel=null]
Jan 28, 2008 11:13:05 AM org.asteriskjava.live.internal.ChannelManager handleLinkEvent
INFO: Linking channels SIP/5101-08db8628 and SIP/outbound-08dbb658
Jan 28, 2008 11:13:11 AM org.asteriskjava.live.internal.ChannelManager handleUnlinkEvent
INFO: Unlinking channels SIP/5101-08db8628 and SIP/outbound-08dbb658
Jan 28, 2008 11:13:11 AM org.asteriskjava.live.internal.ChannelManager handleHangupEvent
INFO: Removing channel SIP/outbound-08dbb658 due to hangup (NORMAL)
Jan 28, 2008 11:13:11 AM org.asteriskjava.live.internal.ChannelManager handleHangupEvent
INFO: Removing channel SIP/5101-08db8628 due to hangup (NORMAL)
Thanks

abhi A
 
Old February 1st, 2008, 03:38 AM
jomet
Guest
 
Posts: n/a
Default

Hi,

Create a file stream in your pgm
then write to the file instead of 'System.out.println' which will write to the terminal
Save the file with .html extension
then open it within the program

Cheers,

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.




Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a useful java gui design tool? yulin11 Java GUI 4 September 2nd, 2008 10:20 PM
Java Gui (Reload Class) Axar Java GUI 0 June 10th, 2006 05:35 PM
Java GUI /Input linfakngiau BOOK: Beginning Java 2 0 October 19th, 2003 03:17 AM
posting data from JAVA GUI eforce Java GUI 0 July 16th, 2003 12:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.