Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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
>>Free Download Visual Java GUI Development Tool bigjava Java GUI 1 May 21st, 2004 08:15 AM
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



All times are GMT -4. The time now is 02:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.