Majestics 84 Posting Pro

Let Me share this before closing this thread
http://www.japura.org/collapsiblepanel.html
Final Solution without work :)

peter_budo commented: Nice, thanx for sharing +16
mKorbel commented: note wrap that into invokeLater +9
Majestics 84 Posting Pro

I am using Jbutton to display panel instead of Graphics class to design some thing? Will it be a good method.... I mean effeciency.....

Majestics 84 Posting Pro

Static keyword is visible to all instance so its updated from 0 to 2, while when u dont use static then "i" original value get printed, which is new for each instance.

Majestics 84 Posting Pro

Yup, drop down side menu, same in like websites... or incase if u used outlook 2007...
Please check this one...

Majestics 84 Posting Pro

is there any open source project for custom menu for java desktop app?

Majestics 84 Posting Pro

Seems like firewall issue, please open port on which you want to communicate.

Majestics 84 Posting Pro

http://www.java2s.com/Tutorial/Java/0240__Swing/CreatingaJTable.htm

You are missing table model. Also ur one must work.

Majestics 84 Posting Pro

Well problem solved without splash screen...............

Majestics 84 Posting Pro

I HAVE TRYING SPLASH SCREEN IN MY APP, BUT CANT GET THE BASICS YET.. SPLSAH SCREEN ISNT WORKING, CAN ANYONE GIVE ME A SIMPLE EXAMPLE
hERE is my code.

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JWindow;


public class introduction extends JWindow {
	
	private Image img;
	
	introduction()
	{
		setSize(128,128);
		img = Toolkit.getDefaultToolkit().getImage("images//loader.gif");
		setLocation(Toolkit.getDefaultToolkit().getScreenSize().width/3,Toolkit.getDefaultToolkit().getScreenSize().height/3);
	}
	
	public void paint(Graphics g)
	{
		g.drawImage(img,this.getSize().width,this.getSize().height,this);
	}
	
	public void setWindowVisible(boolean value)
	{
		setVisible(value);
	}
	
	public void closeWindow()
	{
		this.dispose();
	}
	

}
Majestics 84 Posting Pro

check your ArrayIndex as well, you need to minus when u press previous

397   ArrayIndex = ArrayIndex + 1; // increment the array index to get to the next value

Also you need else if statement to jump on first.

Majestics 84 Posting Pro

I just posted algorithem explaining the method... I have already recieved too many negative points on writing whole code, so i m only pointing the algo. :)

Majestics 84 Posting Pro

http://www.roseindia.net/java/beginners/TypeCasting.shtml
It isnt a question answer Forum, u can search easy question like this over google. Still check above link.

Majestics 84 Posting Pro

If you have limited user and they wont change then use hard code

switch(username)
{
case user1: checkpassword(username);
case user2: checkpassword(username);
default: User Doesnt exit;
}

checkpassword(username); //User Function for checking password

boolean checkpassword(username)
{
if password matches according to username then
true
else 
false
}

If you want to use oracle or ms access for storing password then u must have concept of databases


You can also use binary file to store all username and password and fetch then from file and use them.

File and database will provide password change facility and adding and removing user facility. For large number of user database is preferable , while for small binary file is Ok.

Majestics 84 Posting Pro

Yes, u require a user table in database to handle this thing. Try Oracle or access according to your requirement. Or make ur own file which store username and password and encrypt it.

Majestics 84 Posting Pro

Same problem was with me too... So i simply made a jar with libraries and put images in a seprate folder and made a extract.

Majestics 84 Posting Pro

http://letshare.it/blog/saving-file-to-computer.html Cross Posted.
I think you are choosing a directory.

Majestics 84 Posting Pro

@NormR1, Is there any utility which can change the class file in jar during runtime? Can u please post the link
@mKorbel sorry i didnt get your second line.

Majestics 84 Posting Pro

int has its limit, it cant go beyond that. So loop terminate. Try long or double it will even grab more time then int.

Majestics 84 Posting Pro

Infinite Loop then... 10>1 after first pass it will be 11>1 and then so on....

Majestics 84 Posting Pro

Zero Time. Check ur condition its a straight forward maths question.
1 cant be greater then 1, which causes loop condition false and it ends before it starts.

Majestics 84 Posting Pro

As java programmer know that program made under java are converted to jar file for usage... And an updation in any class require that jar to be updated. So is there any way that we can update the class file at runtime rather then whole jar file. I want to provide update facility to user.

Majestics 84 Posting Pro
JOptionPane.showMessageDialog(null,"Yahoo\nHotmail\nGmail");

:) , Also urs one is correct.

Majestics 84 Posting Pro
tmodel.removeRowSelectionInterval(0,3); // Seems Wrong

Because row selection can be more then total rows.

Same for Add Rows.

Majestics 84 Posting Pro
line 6 
 SequenceFilesFromDirectory

Last Error belongs to it, U have to make object first.

Majestics 84 Posting Pro

What do u want to ask, referential integrity isnt any matter with java....Sql Classes in java load data according to query and you can show them in any table as you want.

Majestics 84 Posting Pro

// Use this constructor
FileWriter("PATH",boolean append)

i mean to enable append use
FileWriter("PATH",true);

Majestics 84 Posting Pro

jasper report can be used with Java desktop application....

Majestics 84 Posting Pro

Follow this link
http://stackoverflow.com/questions/2596641/simulate-backspace-key-with-java-awt-robot

robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_BACK_SPACE);
robot.keyRelease(KeyEvent.VK_BACK_SPACE);
robot.keyRelease(KeyEvent.VK_SHIFT);
Majestics 84 Posting Pro

Try Birt Report or Jasper Report. U can also use oracle reports and crystal reports, Unless u want to create your own reporting software.

Majestics 84 Posting Pro
Majestics 84 Posting Pro

Sorry its title bar.... I am trying different codes , some are working but really slow. I will post the code which suit best for this situation, if i get it before professionals... :)

Majestics 84 Posting Pro

how to move a jframe which has no taskbar?

frame.addmousemotionlistener(this);

public void mousedragged(MouseEvent e)
{
   // What to write here
}

I tried setBounds of jframe but it flicker when we try to move the frame.

mKorbel commented: good question +1 +9
Majestics 84 Posting Pro

Explain a bit more

Majestics 84 Posting Pro

Toolkit.getDefaultToolkit().getImage(path)

Majestics 84 Posting Pro

An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.

http://download.oracle.com/javase/tutorial/java/IandI/abstract.html

Majestics 84 Posting Pro

After a normal choice loop will bring you back to again selecting new choice state, so press 'X' to exit.

Majestics 84 Posting Pro

Thank you all, i will try flash later, because of my little knowledge how to use the flash api correctly..... until then gif is more appropriate

Majestics 84 Posting Pro

Thanx Cherrill, its also a great solution but i want to make flash attach with java.... Animation made under flash are more realistic look then gif files. VB.NET provide support for this, so i m wondering for same in java.

Majestics 84 Posting Pro

My main aim is to provide a startup animation , so application before start produce a good effect on the user, like word, excel etc...

Majestics 84 Posting Pro

I already tried google. I only saw JFLASHPLAYER Api which is not free, so i thought to use Java Fx.... So still in trouble, need professionals help like NormR1

Majestics 84 Posting Pro

How to add flash objects in java without Java Flash Player Api? Any idea. Just hint required.

Majestics 84 Posting Pro

Found the person who was using my ID...... Thanx it solved.

Majestics 84 Posting Pro

yes indeed its easy to create such things in java. You can also use vb.net and vc#.net.
Search the basics from the internet and try posting code.... We cant help without code nor we can make your project.

For Accomplisment check
1) JTable
2) Listener
3) JButton
4) JPanel
5) JFrame

and important of all make a diagram on paper of what you are going to create......

Majestics 84 Posting Pro

Yes, it is possible, google some example , i saw alot example when i was learning jtable... You can modify jtable according to your requirement.

Majestics 84 Posting Pro

NormR1 Right. Here is the syntax

Answer.equals("A")
Majestics 84 Posting Pro

Piece of cake

int a[][] = new int[2][4];  Define and SetSize

You can google many example on 2D Array. Like http://leepoint.net/notes-java/data/arrays/arrays-2D.html

Majestics 84 Posting Pro
Majestics 84 Posting Pro
Majestics 84 Posting Pro

there are mulitple threads , not connected with main.... when one thread ends other take its place and then other... Its a practice excerise for checking threads working from different ways.... :)

Majestics 84 Posting Pro

Thanx Man..... Solved....