:( Sorry the topic spelled incorrectly.. I can't edit it noe.. sorry for that
Friends again need you so badly.. I'm developing my simple GIS application, actually here's what I developed so far..
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
class GUItest01 {
public void go(){
JFrame frame = new JFrame("app");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ImageIcon image = new ImageIcon("C:/icon.jpg");
JLabel label = new JLabel(image);
label.setPreferredSize(new Dimension(1200, 1000));
JScrollPane jScrollPane = new JScrollPane(label);
JPanel panel = new JPanel();
frame.add(jScrollPane, BorderLayout.CENTER);
//frame.setResizable(false);
panel.setBackground(Color.cyan);
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
JButton button = new JButton("Built Environment");
JButton button1 = new JButton("Natural Environment");
JButton button2 = new JButton("Roads Environment");
JButton button3 = new JButton("Traffic Sensors");
JButton button4 = new JButton("Refresh");
panel.add(button);
panel.add(button1);
panel.add(button2);
panel.add(button3);
panel.add(button4);
frame.getContentPane().add(BorderLayout.EAST,panel);
frame.setSize(1500, 700);
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args) {
GUItest01 tg = new GUItest01();
tg.go();
}
}
I want to know how can I draw lines one the plane which the image on it.. there are many examples on the web but I can't find out how to implement those in this code.. please can you show me how to draw a single line.. thank you all