Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:19:33+00:00 2026-06-03T08:19:33+00:00

I have a program allowing script files to compete with each other in a

  • 0

I have a program allowing script files to “compete” with each other in a games such as Tic Tac Toe .

The visualization is made in the console and looks something like this:

|  XO |
| OX O|
|  X  |
- X is the winner! Meh..

Not very exciting.

I was thinking of making a Swing visualisation, but after seeing a presentation on the Raphaël JavaScript vector graphics library I decided that I’d be cool to make the visualization browser based, even though every thing will be running on the same computer.

Do I need a full fledged web server to accommodate for this? How does the JavaScript communicate with the Java program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:19:35+00:00Added an answer on June 3, 2026 at 8:19 am

    Building a Swing interface would be the most straightforward solution, but this would probably be the messiest one as well.

    The web browser solution is probably the most satisfying if you already have a web server going, but has a lot of overhead to set up and properly understand. Then again, you have layers of different technology to play with and get confused in (java, JSP, HTML, javascript, css, etc).

    These days, with HTML5 and available javascript libraries, the web interface is in my opinion the best choice for most interfaces, so you might as well set up your machine and have it available for the next project.

    Any communication between the server (Java) and the browser will take place with a HTTP request from the browser.

    This may happen in two ways:

    a) By pressing a submit button on a browser HTML page and rendering a HTML page on the server as a response (usually through server side scripting like JSP, although you could generate the entire page through java code)

    b) By using Ajax in javascript to make an asynchronous call to the server, which will respond with data that you can then interpret and render with javascript (probably the best solution for what you are trying to do). There are many ready javascript libraries to help you with this, including jQuery.

    In method b, you would essentially be waiting on the server side for a post from the browser and then you would be responding with a page written in XML, json or even pure text. Your javascript code would then interpret the data and render it on the browser HTML page (which you will have loaded at the starting point for the application).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that works with a variety of files on both the
I have a little program allowing users to type-in some regular expressions. afterwards I
I have task to write program allowing users to draw stars, which can differ
I have a program with a large c# chart control. I am allowing zooming
So I have a program that serves as a sort of 'shell' for other
I have a custom made website and right now each time I want to
I have run into yet another issue with my program. I have made several
I have program that has a variable that should never change. However, somehow, it
I have program, that must interact with a console program before my program can
I have program that runs fast enough. I want to see the number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.