Swing/AWT/SWT :: Road Map Of Some Area Inside Desktop Application?
Jul 20, 2014
I try to create Java Swing Desktop application which show Road map of some area in JFrame. But pc not connected to internet it will be in LAN. Map should be like if we scroll the mouse we go down from height in map. Like zooming the area.
I try to find out by google i get lots of forum links but each showing me.
1. I have to do web application.
2. Google not support 'without internet' map facility.
3. I should use lots of jpgs which store in folder for showing map from various height so it look like when we see any map in Google Earth application.
I found goworldwind.org but not clear understanding right now.
View Replies
Jul 22, 2014
I have a project requirement, where I need a desktop java application to interact with web pages. I am currently working in java, so I decided to go with jsp and other java related web technologies. The project requirement is that, there is desktop java application and I need it to interact with web pages. I have zero idea about jsp, jsf etc. Is it possible to make my desktop app to interact with jsp or should I proceed with servlets. If I need to go with servlets, can the front end be designed as an attractive page?
View Replies
View Related
Nov 20, 2014
I have a web app using spring MVC + hibernate on the server side and jquery, ajax, javascript on the client side.
What I wish to do is to convert it into an exe file to make it standalone app.
Is there a software out there that can accomplish it? I don't want to recreate it from the scratch and I only know how to do web apps.
View Replies
View Related
May 13, 2015
This is the code that I wrote but I have two problem with two buttons one of them ... I want to delete the selected text inside the text Area which represented as b[8] and the other button that I want to select parts of the texts which represented as b[0]....
Here is the code..
package KOSAR2;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
[Code] .....
View Replies
View Related
Jul 1, 2014
I have to store data I've pulled from the web i wanted to do this by storing it in a database but after looking at some tutorials i'm not sure if its possible as the databases don't seem to run with the application but instead run as an independent entity.if its possible to have a database in the java application so it runs when the application runs.
View Replies
View Related
Apr 7, 2014
I have a popup that displays textual info and sometimes gets text input from the user. I'm using the following code:
JTextArea textArea = new JTextArea( getGameHistory( true, -2 ) );
JScrollPane scrollPane = new JScrollPane(textArea);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
textArea.setFont(new Font("courier", Font.PLAIN, 12));
scrollPane.setPreferredSize( new Dimension( 30, 100 ) );
String input = JOptionPane.showInputDialog(null, scrollPane, "Fun Chess ",
JOptionPane.YES_NO_OPTION);
This shows a nice text area and an input field underneath it.The getGameHistory() method just returns a long string detailing the current game.Is there a way of just showing the text area without the input field underneath?Can the text area also be used for input instead?
View Replies
View Related
Jan 30, 2015
what I have already tried:
to set the margin of a button - didn´t work
to set anything like padding - didn´t found something for java
to set an empty border - didn´t work
I don´t know what to try next.
My main problem is to enlarge the clickable area without resizing the buttons image.
View Replies
View Related
Dec 8, 2014
The program I'm supposed to create generates a random number between one to ten. Then the program is to ask me if I wish to cross the road.
If you choose to cross, the outcomes for 0-2 are "You crossed safely."
For 3-5, 75% of the time it should say "RIP you got run over", and 35% of the time it should say "You crossed the street."
For 6-8, 60% of the time it should say you made it.", and 40% of the time it should say "You died". For 9-10, it should say "RIP".
So far I have gotten the random number generation part working,
import java.util.Random;
public class test4 {
public static void main(String[] args) {
Random random = new Random();
for(int i =0; i < 1; i++){
int num = random.nextInt(10) + 1;
System.out.println("The number of cars on the street are: " + num + "
Do you wish to cross the road?");
}
}
}
View Replies
View Related
May 2, 2014
I have to make code about finding road with Stack or Queue. At first, I tried to make it in this way...
Java Code:
//public class QueueMain {
public static void main(String[] args){
int [][] arr = {{0, 0, 1, 0, 0, 1, 0, 0, 0}, //p
{0, 0, 0, 0, 0, 0, 1, 0, 0},//q
{0, 0, 0, 0, 0, 0, 1, 0, 0},//r
{0, 0, 0, 0, 1, 0, 0, 0, 0},//s
{0, 0, 0, 0, 0, 1, 0, 0, 0},//t
{0, 0, 0, 1, 0, 0, 0, 1, 0},//w
{0, 0, 0, 0, 0, 0, 0, 0, 0},//x
{0, 0, 1, 0, 0, 0, 0, 0, 1},//y
{0, 0, 0, 0, 0, 0, 0, 0, 0}};//z
String [] add = {"P", "Q", "R", "S", "T", "W", "X", "Y", "Z"};
int originnumber = 0;
int destinationnumber = 8;
[Code] ....
But it doesn't work at all. I tried to put visited address into array<mark>... but it didn't work.
View Replies
View Related
Apr 9, 2014
I have a Jframe and i want to add inside 4 different jpanel.This is easy.
what is difficult is how can i change them dynamically with 4 other new jpanels and 4 other new jpanels?
I have try with BorderLayout but not working.
It's a wizard like but not the same.
I have a jpanel with jbuttons jpanel with a jtable jpanel with textarea and jpanel with jlabels. All this have to change with other 4 jpanels, where to look?
View Replies
View Related
Mar 9, 2014
I have a Tcr object as a member variable of the JFrame. But When ChangeListener swings into action, the variable inside it are all nulls. the TcrPanel is created before the ChangeListener is triggered.
Tcr tcrPanel;
tabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (e.getSource() instanceof JTabbedPane) {
CloseButtonTabbedPane pane = (CloseButtonTabbedPane) e.getSource();
[Code] ....
View Replies
View Related
Mar 19, 2015
I have this piece of code, i want to insert a text inside my shape.
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import java.awt.Color;
[Code] ....
View Replies
View Related
Mar 19, 2014
I would like to be able to change the locale in my Swing application at runtime and have all the text elements on the GUI update themselves with localized text from a ResourceBundle of the new locale.If there a simple way of achieving this without having to create an event model for all GUI pages?
View Replies
View Related
Apr 17, 2014
I am developing a java based software connected with a mysql database. I have an Item table in my database. I created a bean class which can keep all item data with it and. Then I loaded each Item data in to its object and fill a Jcombobox. Now I want to search with Item name and get all Item data when selecting that item. I have overidden the toString method to Item name in that class. Is there any way to search my Item objects inside a jcombobox?
View Replies
View Related
Mar 12, 2015
I want to draw a line inside a circle, i what to have a horizontal line. Here is what i have done so far.
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import java.awt.Color;
import java.awt.Dimension;
[Code] ....
View Replies
View Related
Dec 31, 2014
I am making an application in java, inside static void main, i want to customize all buttons, text areas and want to put them on desired location inside application. I have tried to use setbounds but can not use it, how can i use it, or is there any other way or layout to make my application components customized layout.
View Replies
View Related
Jan 31, 2014
I don't know if this is appropriate to Swing/AWT, or even if this is a Java issue, but I had quite a shock recently. I have been working on a kind of drawing program in which the user can select tiny control rectangles and drag them around, causing the shape of a polygon to change. (They are not implemented as Java Polygons or Shapes because some are one-dimensional). I have gotten it into pretty good shape, so I exported it from Eclipse, my development platform, into a standalone Java application. In the standalone application, each time I drag the mouse, the redrawing shows nasty flickering, as if it's running too slowly. While I was developing the application inside Eclipse, it ran perfectly, with no flickering whatsoever.
What gives? I'd expect that the in-Eclipse runs would be slower, because they're burdened with extra debugging baggage, while the exported standalone version should run faster. But the reverse is the case.
View Replies
View Related
Aug 9, 2014
this code won't compile because selected row must be declared as final because of it being defined outside the window listener. Is their anyway around this? If I make it final the first time that the variable is called it keeps it starting value until the GUI is closed.
butEdit.addActionListener (new ActionListener () {
@Override
public void actionPerformed (java.awt.event.ActionEvent evt) {
int selectedRow = table.getSelectedRow ();
final String [] values = custTableModel.getRowValues (selectedRow);
[code]....
View Replies
View Related
Oct 4, 2014
I am building a GUI application which consists of two panels "panel" and "panel1". "panel1" have a button "addTimer" when clicked it should add the "panel" to the frame if i gain click the button it should again add the "panel" without overlapping the previous "panel" rather it should be created below the previous "panel". If i click on the button "addTimer" n times it should add the panel n times. Along with this the frame size has to dynamically change depending on the number of panels produced. Below is the code i tried my level best to satisfy the above conditions.
package superTimerV2;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SuperTimer extends JFrame {
private static final long serialVersionUID = 1L;
[Code] ....
View Replies
View Related
Feb 9, 2015
In the method mouseClicked(MouseEvent me) the co-ords of the click are obtained.
* if they are within the confines of the rectangle rect, console output System.out.println("inside box") is displayed
* in either case the click co-ords are displayed in the console
I'm getting the co-ords of the mouse clicks but no message when the click is inside the box
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/*
Experiment 04 was successful. So now (Experiment 05) I must try and see if I can identify mouse clicks that occur within the rectangle.
*/
public class AFrame extends Frame implements MouseListener {
ARectangle rect;
public AFrame(ARectangle rect) {
[Code] ....
View Replies
View Related
Jan 5, 2015
I have a program where i want to indicate the user when i have completed a task which i am running inside a for loop. Below is my code.
for(Map.Entry<Double,SimplestCopyInstance> entry : myList.entrySet()){
double key = entry.getKey();
SimplestCopyInstance scp = entry.getValue();
Copy cp = new Copy();
cp.putLocations(scp.getSrc(), scp.getDes());
scp.setStatus(cp.baseCopy()+"");
[Code] ....
I have used netbeans to build my app. So there creating jTable is out of my control as that part was inside auto-generated code. I have just used the jTable.setValue().
My problem is, above method is inside a button click event. Updated values not displaying until the loops ends.
View Replies
View Related
Jul 16, 2008
I am trying to drag and drop tree nodes within the same JTree. I have a code which uses Java 1.2 java.awt.dnd.I would like to use TransferHandler and newer implementation.I have found a code which works when JTree is drop target but there is no code where Jtree is drag source and drop target.
View Replies
View Related