peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

And what is your question?

PS: Just found you made double post, They been moved together.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

One thing you should also be aware of, database connection from JSP is out of date. Now JSP is used for presentation purposes (user input, or system data presentation for user) and servlet handle logic, which includes DB connectivity

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Red marked parts are changes that I made, I hope it doesn't need explanation

import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;


public class Test extends JFrame {
	public boolean mouseClick = false;
	
	public static void main(String[] args){
		SwingUtilities.invokeLater(new Runnable() {
			public void run(){
				new Test();
			}
		});
	}

	private Test(){
		super("test");
		launch();
	}
	
	private void launch(){
		setBounds(100, 100, 100,75);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
                
                JButton b = new JButton("Test Me");
		b.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ae){
				if(!mouseClick)
				{				
					performLeftClickAction((JButton)ae.getSource());
				}
			}
		});
		b.addMouseListener(new MouseAdapter() {
			public void mouseReleased(MouseEvent me){
				if(SwingUtilities.isRightMouseButton(me)){
					if(!mouseClick)
					{				
						performRightClickAction((JButton)me.getSource());
					}				
				}
			}
		});
		
		JPanel p = new JPanel();
		p.add(b);
		setContentPane(p);
		setVisible(true);
	}


	private void performLeftClickAction(JButton b)
	{
		b.setText("Left Clicked");
		//problem starts here
		b.removeMouseListener(b.getMouseListeners()[0]);
		b.removeActionListener(b.getActionListeners()[0]);
		mouseClick = true;
	}
	private void performRightClickAction(JButton b){
		b.setText("Right Clicked");
		//error here
		b.removeMouseListener(b.getMouseListeners()[0]);
		b.removeActionListener(b.getActionListeners()[0]);
		mouseClick = true;
	}
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Nice one.
Can you please mark this post as solved? Below last post is link that reads "Mark as solved" or something like that, thanx...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Post your code, somebody may help you with debuging

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I can only suggest to try trace payment on given date or close proximity. Never seen WHOIS not to return registrar result

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you do infinitive loop you crash. What is purpose of this exercise?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

My preference is MySQL, MS Access is no good in my opinion

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

No, fireworks is sort of cut down version of photoshop and is popular with developers as easy way to edit their images

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What is point to bump post started 2 years ago, with last respond some 18 months back?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I am receiving and error when trying to compile and cannot seem to figure out why and would appreciate any help.

Errors

C:\Java\Daniweb\Inventory3.java:31: cannot find symbol
symbol  : method getValue()
location: class Product
System.out.printf("Value of Inventory: $%,.2f\n " + inventory[i].getValue());
                                                                                    
C:\Java\Daniweb\Product.java:79: cannot find symbol
symbol  : method calculateInventoryValue()
location: class Product
return "\nName: " + itemName + "Item #: " + itemNumber + "\nStock: " + invStock + "\nPrice: $" + itemPrice + "\nValue: $" + calculateInventoryValue();

Error are absolutely clear, none of the red marked methods exists. Check your Product class and tell me what you found there

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Some modifications done, see red sections. I think they are self-explanatory

import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Interface extends JFrame
{
	public static final int WIDTH = 600;
	public static final int HEIGHT = 500;
	int i = 0;
	private JButton newSongB, exitB, deleteSongB, playlistB, searchB;
	private NewSongButtonHandler nsHandler;
	private DeleteSongButtonHandler dsHandler;
	private PlaylistButtonHandler plHandler;
	private SearchButtonHandler sbHandler;
	private ExitButtonHandler ebHandler;
	
	public JLabel nameL, artistL, fileSizeL, durationL;
	public JTextField nameTF, artistTF, fileSizeTF, durationTF;
	public JButton menuB,enterSongB;
	public MainMenuHandler mmHandler;
	public EnterSongDataHandler sdHandler;
	
	//private void run()
	//{
	//This method should control the flow of the program
	//and have all code for accessing the playlists
	//and song database
	
	
	public Interface ()
	{		
		newSongB = new JButton("Enter New Song");
		nsHandler = new NewSongButtonHandler();
		newSongB.addActionListener(nsHandler);
		
		deleteSongB = new JButton("Delete Song");
		dsHandler = new DeleteSongButtonHandler();
		deleteSongB.addActionListener(dsHandler);
		
		playlistB = new JButton("Playlist");
		plHandler = new PlaylistButtonHandler();
		playlistB.addActionListener(plHandler);
		
		searchB = new JButton("Search Database");
		sbHandler = new SearchButtonHandler();
		searchB.addActionListener(sbHandler);
		
		exitB = new JButton("Exit");
		ebHandler = new ExitButtonHandler();
		exitB.addActionListener(ebHandler);
		displayMenu();		
	}
	
	public void displayMenu()
    {
    	setTitle("Mp3 database: Please select Function");
    	setContentPane(new Container());
        Container pane = getContentPane();
        pane.setLayout(new GridLayout(5,0));
        
        pane.add(newSongB);
        pane.add(deleteSongB);
        pane.add(playlistB);
        pane.add(searchB);
        pane.add(exitB);
        
        setSize(WIDTH,HEIGHT);
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        
    }
	
	private class NewSongButtonHandler implements ActionListener
	{
		public void actionPerformed(ActionEvent e)
		{
			//JFrame newFrame = new JFrame("This frame popped up");
			//newFrame.setSize(100,100);
			//newFrame.setVisible(true);
			
			setTitle("Enter Song Info");
			
			nameTF = new JTextField(10);
			artistTF = new JTextField(10);
			fileSizeTF = new JTextField(10);
			durationTF = new JTextField(10);
			
			nameL = new JLabel("Enter Song Name: ",SwingConstants.CENTER);
			artistL = new JLabel("Enter Artist Name: ",SwingConstants.CENTER);
			fileSizeL = new JLabel("Enter …
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That is beacuse you adding new content to existing content of your JFrame

public Interface ()
{
      //code befor this point
	Container pane = getContentPane();
	pane.setLayout(new GridLayout(5,0));
}

and then on button press

private class NewSongButtonHandler implements ActionListener
{
	public void actionPerformed(ActionEvent e)
	{
                //code befor this point       
		Container pane = getContentPane();
		pane.setLayout(new GridLayout(5,0));
          }
}

which will basicaly take already existing JFrame and add new content on the end of what ever is already in

So either clear the JFrame before you add new content or call new separate JFrame to display the content over there

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

IE is misguiding, it has bad habbit on not following w3c standarts you better to use firefox.
Can you post your xml file?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) Do you have Tomcat installed on your pc?
2) That the code show in IE doesn't mean it is working correctly, use Firefox for design checking
3) What errors you getting?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Wouldn't be that because you disabled scrolling? Did you try to set it as auto?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@guerreronoli congratulation of you being hyper-active and breaking the fun of the game when Karkalash was supposed to come with solution on his own with little help that he already received... Beside would be nice if you spend sometime reading forums rules, there little section that says For easy readability, always wrap programming code within posts in CODE tags.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

First post you asked for JavaScript now you want PHP so what is gone be?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have look at StringBuilder?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

is it jus school assignment or real project? why asked, in school project the check out does not have to be in deep, also in mean time you can have look on some of these links

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can Anyone help me out in creating aa new website. I can create using html but i need to learn how to use dynamic pages. Cna anyone let me know how can i get started??

You will need to decide what technology you wish to learn in order to get dynamic content PHP/ASP/JSP. I would recommend JPS but then you would need to know Java, but I expect you do not so this would long time shot. So you left either with ASP or PHP. I'm not realy "microsoft fanboy", I think many of they approaches are overkill so I would suggest to learn PHP. You can piick up basics at w3schools.com, there many other online resources also if you prefer hard copy there are many books to choose from

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Download SQL Server Management Studio Express that will do the magic (its free)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ouch, you just hurt my feelings....
Why you not using MySQL, it is more easier to work with (in my opinion). If you wish to stay with MsSQL you need to get your self ODBC connector and learn to use it

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

It is more of question what database you using MySQL/MsSQL/Oracle

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

No if you can create one for your self, but I would not recommend that. Better to stick with connectors....

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

JavaScript is not Java or JSP ! ! ! Post moved to JavaScript section...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Then I recommend you go through w3schools tutorials on wap and get your hands on XML

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

To understand WML Script you first need to know WAP. Are you trying to do mobile web development?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Is there any reason you wish to learn WML?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you actualy browsed their site you would find they have extensive collection of videos explaining how to

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Copy and past lin to your page into validator and you will be supriced to find few mistakes :)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Your question is not well explained but I guess you looking to create panorama. If so here is tutorial how to do it

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to provide requerements as above description is not valid

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thanks, can you mark as solved and give me some reputation points?

Begging for reputation, where this community going???

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You should get proper smack on hands for attempting to communicate with db through JSP. The correct way to communicate with bd is collect data from form and send them to servlet, you can do validation either on form page with script or on servlet side. Servlet does all communication with db and you then just collect results either data stored/data retrived/some error occured. JSP is just for presentation purpose it is servlet that is the worker.
Please have look on these tutorials from Sun Microsystems

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Check the email header for original address most mail application have such option you need only search for it. For example in Microsoft Outlook you need yo right click on received message and select Options, new windows opens and there you see info on Internet headers. Yahoo account select full header to read whole info, in Webmail open message click on Message Source and so on, by checking header you should be able to find original sender

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I guess he should realy show more interest in this case but he may be too busy with his blog. ;) <offTopic>Interesting things, but not coolest in my opinion</offTopic> I hope he will at least say thank you

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Unfortunately nobody as it is clearly stated here

This forum is meant for discussing programming languages in addition to exchanging code and algorithms. However, it has become a problem where too many students are posting homework problems expecting a quick solution without ever trying for themselves. Not only does this constitute cheating, but it is very discouraging, frustrating, and annoying to everyone who takes valuable time to answer programming support questions.

Though we are all here to help, please don't expect quick solutions to your homework. We'll help you get started, exchange algorithm ideas, how-to's, etc. but only if you show that you're willing to put in effort as well.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

dskumar_85 please do not flood forum with same quoestions in mutiple posts!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

any example would be helpful! Pls

Does the getRequestURL() need any example?

Reconstructs the URL the client used to make the request.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Some results by quick search of google

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The tutorials are just how to get Tomcat working with Eclipse not targeted to teach JSP, for that is realy best to pick up book

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you happy with JavaScript why not...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There is no plugin for JSP you need to install Apache Tomcat on your machine in order to run JSP. Select any of the tutorials found on google to get you started, here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

xampp is one solution, but if you still prefer to set up whole thing this tutorial may help you

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here is your MySQL tutorial

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Only diference that I spoted is top images marging from top of the page, plus seems to me there is no font formating in FF. Can you make a screenshot or tell exactly what is the problem?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Message been removed as it was spam...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You may get some hints of errors if you try to see the page in IE, but in general there are not many well know profesional tools. Here is some google search if that helps

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to give a name and id to your IFRAME (same say one is enought I rather assign name to both) and in links you need to specify target where you want to display them. Something like this

<table width="200" height="200">
<tr>
	<td>
        <a href="page2.html" target="iFrm">Link to page 2</a>
        <br/><br/>
        <a href="page3.html" target="iFrm">Link to page 3</a>
        </td>
    <td>
    <iframe src="page2.html" width="100" height="200" name="iFrm" id="iFrm"></iframe>
    </td>
</tr>
</table>