Windows Application Design Methods?

Feb 16, 2015

I need to get Windows application made.   Is there a graphical, drag&drop  layout tool in which I can place 'controls' such as buttons, panels, toolbars onto a window then write the code to respond to them? It seems to be common place in other systems.

View Replies


ADVERTISEMENT

Servlets :: Simple Web Application Design With JSP

Apr 13, 2014

I am trying to design properly a simple 1to50 game (yes, the one that is so popular among mobile apps), but as a web application that allows two player games. I tried to document myself on the technologies I could use and came to the decision that some kind of Java would be suitable. I know that HTML, HTML5, CSS, JavaScript are client side languages with what I can basically design the client application that runs on a web browser. I installed Tomcat web server, configured Java Servlet API, done some research on Servlets and JSP, but I still cannot really imagine how all of this can work. Servlets form the Controller, JSP files the Model? How can I make them communicate, how can Servlets "tell" JSP files what to dynamically generate? Can JSP files communicate with JavaScript? Is JavaScript even necessary?

I thought that this question is not basically about a specific thing regarding JSP or Servlets, more about design and general concept, that is why I put this question under beginning Java.

View Replies View Related

Swing/AWT/SWT :: Making GUI Application Design Extensible

May 5, 2015

I have to create a Swing application for which i haved a set of requirements as,

1. there will be two JPanels ,left and right, on the main JFrame , left frame would contain a JTextField and a submit JButton ,user can enter values 1,2,3 ,in the JTextField and presses the JButton

a. if user enters 1, a JTextField will be shown on right JPanel
b. if user enters 2, a JTextField and a JRadioButton will be shown on right JPanel
c. if user enters 3, a JTextField and a JComboBox will be shown on right JPanel

So I have done that but when my boss sees the code behind this application he told me to make it more extensible i.e. if there is going to be an additional requirement for values 4 or 5 or 6 and so on , then i have to make minimal changes in my code or no change in my code and it should work . how this can be done ? is it possible make such software design ?

public class DesktopApp extends JFrame {
private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(DesktopApp.class);
private JPanel jp, jp2, mainPanel;
private JLabel jl, jl1, jl2, jl3, jl4, jl5;
private JTextField jText, jText2, jText3, jText4;

[Code] ....

What wrong am i doing here in this code which in not considered to be an extensible design ?

View Replies View Related

Design And Implement Application That Produces Multiplication Table

Feb 28, 2014

Design and implement an application that produces a multiplication table, showing the results of multiplying the integers 1 through 12 by themselves

View Replies View Related

Using Only Java Swing Without Windows Builder To Build GUI Application?

Oct 8, 2014

Difference between using windows builder in eclipse v/s using only java swing without windows builder to build GUI application?

View Replies View Related

Swing/AWT/SWT :: Running Application Using Java 1.6 And Windows-based X Server

Apr 15, 2011

At our company we run a third-party Java-based GUI application on one of our Linux server machine, displaying the application to our local Windows work stations using the Cygwin X Server.We noticed a few problems with a new version of this application and was able to narrow it down to the following conditions:

1. Java Swing application running on a UNIX host;
2. Java used is 1.6 (problem not noticed when using Java 1.5)
3. Displaying to Cygwin X server (I've heard other windows-based X servers have the same issue, but I don't have access to any others at this time).

If we run the application natively on Windows, I'm told if the application runs on the Linux host and displays natively to that machine's display there are no problems (although I'm not able to verify this myself).The problems are:

1. Any new frame/dialog is opened in the geographic center of the dual displays, rather than in the middle of one or the other;
2. Any attempt to drag the window to a different location on the display seems to work, but as soon as you let go of the drag, the window snaps back to the original location. This only happens the first time you try to move each window.
3. Drop-down controls (JComboBox, for example) just close back up as soon as you click on them. If you click and drag the mouse to attempt to make a selection, no selection can be made.

Are these known problems using 1.6 on UNIX displaying to Windows-based X Servers?

The only real problem is number 3. I expect that if I put more work into the window placement, I should be able to get past number 1. Number 2 is just a minor annoyance.The following is a simple Java Swing application which when run in the correct environment will exhibit the problems.

import java.awt.EventQueue;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

[code]....

View Replies View Related

How To Deploy Java Swing Application For Windows Without Revealing Source Code

Feb 21, 2015

How to deploy Java Swing application as windows software. I have tried the following to do this :

I have created jar file for my project after that created exe file using Launch4j and Advanced installer, exe file produced by both software are working fine but those are placing the jar file inside that exe file, My problem is any one who has that exe file can extract and view the source code by decompiling java class file. Is there any way to deploy java application without decompiling the code.

View Replies View Related

Does JavaFX Methods And Objects Works Into Java Application

Nov 22, 2014

I was doing a project in a usual Java Application, but now maybe I have to use some tools that are contained in javafx.scene.media.MediaPlayer so I wonder if can it all work? Will javafx methods and such works?

I have to use javafx.scene.media.MediaPlayer beacuse I have to create a very simple audio player (one jbutton and one jcombobox).

View Replies View Related

EJB / EE :: Convert Standalone Java Thread Application Into Web Application In Tomcat

Nov 17, 2014

convert or move standalone java thread application into Tomcat server container for accessing its JNDI services? Also is it possible to schedule this thread application in Tomcat server? is it possible to keep this app in tomcat as web application and schedule in window's scheduler.

View Replies View Related

Deploying JNLP Application In WebSphere Application Server

Mar 11, 2014

I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.

1.Created a dynamic web project JWStartProject in eclipse

2.Create a HelloWorld.java class under default package.

import javax.swing.*;
public class HelloWorld extends JFrame {
private static final long serialVersionUID = 4968624166243565348L;
private JLabel label = new JLabel("Hello Java Web START!");
public HelloWorld() {
super("Jave Web Start Example");
this.setSize(350, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
this.setLayout(null);

[Code] ....

Now I exported this project as JWStartProject.war contains following code.

Created Server in Websphere Admin console

Deployed this war file under the server and started.

I have added MIME types also.

I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?

View Replies View Related

How To Design Classes

Mar 29, 2014

design a class to conduct a survey of three hospitals. you want to know how many sectors (eg operation, children, gastronomic) each hospitals have, and how many doctors there are in each sector.

what is the process of class design?

View Replies View Related

Head First Design Pattern

Jan 11, 2014

I was reading head first java and the author told to read head first design pattern next.

View Replies View Related

Java Design Patterns

May 9, 2015

we have been given a scenario to design a system in which we have to make the class diasgrams. however we have to use appropriate patterns that match the scenario.

View Replies View Related

Front End Design In Java GUI

Jul 11, 2014

I am designing an application I want to know what are the best technology Like Java FX for front end design?

View Replies View Related

Java Loop Design

Jun 16, 2014

Basically I have to enter 5 numbers that I put through a loop and they print the star * depending on the number.An example would be this 5:*****. However, my codes prints out 5:*; 5 times. How to correct my code

Java Code:

import java.util.Scanner;

public class IntegerOutput
{
public static void main( String args[] )
{
Scanner input = new Scanner( System.in );

int num1;
int num2;
int num3;
int num4;
int num5;

[code]....

View Replies View Related

Handling MVC Design With DatabaseDAO

Mar 31, 2015

I have done this a few times but I want to make sure I am doing it correctly. In other words creating a clean understandable program. Instead of posting code I will just talk about this is my plan:

Create a model (getter and setters)
Create a view (via swing)
Create a controller (pass the model and view in the parameter)

Database DatabaseConnection:
Use the singleton pattern

Database:
Create an interface called Database with all the queries I will need (insert, delete etc)
Create a class called DataBaseDAO and implement the interface database and get an instance of the DatabaseConnection.

Tying it all together:

In the controller should I use the "new" operator and create a new database class or extend the database class? I am thinking I should not do it in the controllers constructor but make a field if I use the "new" operator like:

private Database db = new Database();
Create a class called App
Create a new Model
Create a new View
Pass the view and model into the controllers parameter.

Am I on the right track? Is this messy? Is there a better way of doing it?

View Replies View Related

How To Design - Interface Usage

Jul 17, 2014

I have a class as shown below. This class has a method addFilter with 2 parameters (type String and type Command1 )

public class Command1 {
public StringBuffer addFilter(String query, Command1 dataBase) {
//concrete implementation
return query;
}
}

I have another class Command2. Here I need a similar method. The only difference is in the type of parameters passed. (type String and type Command).

public class Command2 {
//TO DO:
public StringBuffer addFilter(String query, Command2 cmd) {
//concrete implementation
return query;
}
}

I have started by using Interface

public interface Helper {
public StringBuffer addFilter(String query, XXXXX parameter2);
}

I would like the classes Command1 and Command2 to implement the interface Helper and override it these two public classes.

However my problem is in dealing with the 2nd parameter. Am I right in my approach? How do I handle this issue?

View Replies View Related

Design Pattern Selection

Mar 27, 2015

I need selecting which design pattern to use in my case.

I am creating a list of objects "items" to be presented in a list for the user to choose from, all objects have a title and a check box. Some objects have additional textbox for user input, some objects have additional image for illustration, and some objects have additional textbox and image as well.

I read and saw online videos but not sure if my selection "Factory Design Pattern" is the best match.

View Replies View Related

Using Loops To Create A Specific Design?

Sep 10, 2013

I am completing the exercises in Java How To Program 8th Edition by Harvey and Paul Deitel.There are two optional exercises GUI and Graphics Case Study Exercises on page 141 Chapter 4.

I have to use loops and control statements to draw lines thereby creating two designs.I am trying to create the design on Fig. 4.20. The lines do not line up correctly.The lines should fan out from all corners. Individually, they look exactly like it should.

Example of one corner.

int width = getWidth();
int height = getHeight();
// upper-left corner
int startX = 0;
int startY = 0;
int endX = 0;

[Code] ....

For the other corners I have different starting and ending positions.To draw upper-left corner I have a starting position of 0,0 and ending position of 0,height.I then move ending position up one vertical step and right one horizontal step. I repeat this fifteen times.

To draw upper-right corner I have a starting position of width,0 and ending position of width,height. I then move ending position up one vertical step and left one horizontal step.

To draw bottom-left corner I have a starting position of 0,height and ending position of 0,0. I then move ending position down one vertical step and right one horizontal step.

To draw bottom-right corner I have a starting position of width, height and ending position of width,0. I then move ending position down one vertical step and left one horizontal step.

For the second design Fig. 4.21 all my lines line up correctly no matter the direction I resize it. Both designs frame size is 250,250. Both designs are divided into fifteen steps.

View Replies View Related

Compare Inheritance And Design Patterns?

Apr 30, 2014

Design Patterns are one form of reuse. so is inheritance. what are the similarities and difference between them?

View Replies View Related

Design A Class To Represent A Rectangle

Jan 8, 2015

I was told to design a class named Rectangle to represent a rectangle.The class contains:

■ Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 for both width and height.
■ A no-arg constructor that creates a default rectangle.
■ A constructor that creates a rectangle with the specified width and height.
■ A method named getArea() that returns the area of this rectangle.
■ A method named getPerimeter() that returns the perimeter.

Draw the UML diagram for the class and then implement the class. Write a test program that creates two Rectangle objects one with width 4 and height 40 and the other with width 3.5 and height 35.9. Display the width, height, area,and perimeter of each rectangle in this order.Here is my code for the Rectangle Class:

class Rectangle
{
double width;
double height;
public Rectangle() {
width = 1;
height = 1;

[code]....

The error that I am given when I compile the driver is as follows:constructor Rectangle in class Rectangle cannot be applied to given types; required: no arguments; found:int,int; reason: actual and formal argument lists differ in length.

View Replies View Related

Design Patterns And Java Algorithms

Nov 22, 2014

I've looked over the concepts of Java programming, tested them in code and i understand most of them. I have a problem when i need to make harder programs , this might be because i dont know design patterns and algorithms.I'm curious what a entry level programmer needs to know to get a job in the field. Right now i was thinking i need to know:

1. The way all big concepts work and most of the keywords.

2. Design patterns.

3. Algorithms.

what i actually need to know for an entry level job and can you tell me which design patterns and algorithms are a must know for that first job. Considering i might have financial problems in the near future this is not a theoretical question, i really need to know what i need to learn in the next 2-3 months to get an entry level job down.

View Replies View Related

Servlets :: How To Design A Shopping Website

Nov 23, 2014

I am working on a Project of Ecommerce Shopping WebSite in Java.

First I Decided to use Servets,JSP,Spring,hibernate etc.. from Scratch to design its Layouts and Functionality.

But After Reading this Thread [URL]...

I Found that there are already some Ecommerece Solution that are availabale in Java Like Magento.

Is it worth To use these Ecommerce Solution for Development Purpose of Premium Purpose.

I read that some of them are Open Source.

If a ShoppingCart Solution is OpenSource then Can We Use that to develop and Distribute for Premium Purpose?

View Replies View Related

How To Make A Flat GUI Design With Java Swing

Apr 26, 2014

Here is an example of a GUI. Is it possible to make this kind of a thing using Java Swing? Is it possible to have a picture on the entire background of the JFrame, and then other Swing components like buttons, labels etc. sitting on it?Is it possible to have action listeners behind pictures? In other words, they will behave like buttons: the user clicks on them and they do something.

View Replies View Related

Servlets :: Architecture Design For Shopping Database

Apr 2, 2015

I'm working on a consulting training project to create a eCommerce online shopping application. Nothing big, just something functional and simple. That's why I want to structure it with the easiest maintainability possible. I've already ironed out the the database entities and how they'll relate to one another and even managed to establish connection to the database from my java application class. NOW I need to configure a user session on the web.xml, from what I've learned so far in my consulting, I can easily use jsp and servlets to have httpsession objects receive and send the information needed to and from the database, but the question is, how many do I need for a client's session?

Would maintainability be easier if I divide each entity's class actions to different servlets(a customer servlet, order servlet, product servlet, etc...), or can a single servlet handle an entire session without any complication?

View Replies View Related

Design And Implement Word Guessing Game

Dec 29, 2013

I have a project about programing a game in java . In this project you are required to design and implement a word guessing game. In the game, user selects one of the available dictionaries (animals, plants, technical, names, etc. ), and the program randomly chooses one word from that dictionary and displays it by scrambling the letters. The user tries to guess the word while a guess counter starts to count down (lets assume it starts from 5).

While counter counts towards zero, the program chooses -randomly- two misplaced letters and puts them into correct positions to reveal the word more and give the user a hint. However, giving a new hint reduces the total value of the question. Lets say if the initial value of the question is 500 when all letters are scrambled, it reduces to 400 after 1st incorrect guess and hint, then after every incorrect guess it reduces more. You can determine the value of the question by the length of the word. The other details of the game is as follows:

1.You must design at least three classes (for example game, scrambledword, and dictionary).

2.Dictionaries are written in text files. If you design a class for dictionary, it must be constructed by a user chosen category ((animals, plants, technical, names, etc). In the constructor, the dictionary text file corresponding to this category must be opened and read; and words in that dictionary must be read into memory (e.g. String array). You must submit your dictionaries with your code. Do not share dictionaries between friends.

3.The game will record your total points and name in a text file where a hall of fame which has different users and their total points in 10 questions. You can design and implement a class for this.

4.Bonus+5%: Put user interface modules textboxes, buttons, etc Or

a.Use class hierarchy

b.Use of thread and timers and reducing the question value by timer instead of guesses.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved