Majestics 84 Posting Pro

http://docs.oracle.com/javase/tutorial/essential/io/rafs.html Use Random Access File Class, it helps you to position your cursor on desired location on file and over write the sold objects with empty spaces. And instead of using text file why dont you use database, like mysql or access. or you can move towards xml to make the process more efficient.

Majestics 84 Posting Pro

Kindly paste the error or explain it. Reading a huge code is a bit difficult for every programmer.

Majestics 84 Posting Pro

Your welcome, kindly please close the post if it solved your problem, so in future other can be benefited.

Majestics 84 Posting Pro

Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes (JFC) — an API for providing a graphical user interface (GUI) for Java programs.

Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit (AWT). Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform. It has more powerful and flexible components than AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides several advanced components such as tabbed panel, scroll panes, trees, tables and lists.

Unlike AWT components, Swing components are not implemented by platform-specific code. Instead they are written entirely in Java and therefore are platform-independent. The term "lightweight" is used to describe such an element.

http://en.wikipedia.org/wiki/Swing_%28Java%29

More Links
http://cs.nyu.edu/~yap/classes/visual/03s/lect/l7/
http://www.javabeginner.com/java-swing/java-swing-tutorial

engrjawad commented: Nice Info +0
Majestics 84 Posting Pro

You actually need to learn events through buttons in c#.
http://www.homeandlearn.co.uk/csharp/csharp_s1p8.html
Check out the link.

Majestics 84 Posting Pro

You have to change your key listener from Released to Pressed. Reason is on release it check so your characters go out of range. Hope this help.

 public void keyPressed(KeyEvent key)
Majestics 84 Posting Pro

It isnt difficult, all you have to learn graphics library of java. Its drawing of a rectangle and putting buttons over it. Also u can draw a jpanel and put buttons and increase it size gradually.

http://www.imint.com/demos/islide/demo3500.htm

this website will help you.

Majestics 84 Posting Pro

for checking strings use equal function. == sign doesnt work properly while checking strings.

E.g String a  = "hello";
    a.equal("hello"); // ---- true ----------------
Majestics 84 Posting Pro

Better check the documentations for these warnings.
http://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html

This error is because of serializable class. You have two ways to eliminate this

1) Give it a ID
private static final long serialVersionUID = any_Id;

2) If you using eclipse then use
@SuppressWarnings("serial") // this anotation will disable the warning because of serial.

vinnitro commented: thnx for helping it worked +2
Majestics 84 Posting Pro

If you are using JDK 1.7.0 then you have to use generic type as stated in its documentation
http://docs.oracle.com/javase/7/docs/api/javax/swing/JComboBox.html

You wont find that problem in 1.6.

Majestics 84 Posting Pro

Caches is a intermediate memory which is required to hold data. This provide faster performance by hardware. In computer cpu has registers then caches. L1 Come first then L2 and then L3 and so one. In last it has access to Ram. The more near to cpu the more it is faster. If we eliminate the register and cache memory and consider ram is only source for temporary storage then cpu will take longer time to process the application which effect the computer performace badly.

As the near to cpu the most faster they are , which make register very fast. but it is very costly to build register so cache was introduced to take extra heavy burden.

L1 can have more or less memory the L2. But L1 memory is faster because it is present in each single cpu. If you have multi core cpu then you will have multiple L1 cache. L2 on other hand is shared among all cpu cores.

If the size of L1 was the same or bigger than the size of L2, then L2 could not accomodate for more cache lines than L1, and would not be able to deal with L1 cache misses.

References http://stackoverflow.com/questions/4666728/size-of-l1-cache-and-l2-cache

Majestics 84 Posting Pro

Its a easy task. U better learn some joins for database. I am writing a pesudo query for you , use the syntax and build one for you.

select the required fileds from table t1, table t2 where t1.articlenb = t2.article and t1.cell = 'yes' and t2.instock > 0
Majestics 84 Posting Pro

I think you have to make your o.s capable to display the chinese text, not the editor. Goto Reginol and language settings and install asian font. That will do it.

Majestics 84 Posting Pro

echo your $name, also paste your url address here, seems like you are not passing correctly the name parameter.

Majestics 84 Posting Pro

1) Check wether main string is null (if(str != null)) then
2) After that get the length of Str, if it is more then 3 then check if(str[3] == null) then
.........................................................................................

Majestics 84 Posting Pro

1) strrr object isnt intialized yet, u have initialze it first.
strrr = new String[size];
2) Now u can check your string, if its null dont split.

Majestics 84 Posting Pro

Please paste ur code... It seems u are calling file chooser in constructor rather then in actionPerformed Method. Still itsnt clear until you paste your code.

Majestics 84 Posting Pro

Seems Like a report, Use Jasper Report http://jasperforge.org/ , oracle reports or crystal reports.

Majestics 84 Posting Pro

I think you are confused in passing a class as a paramater,
You can pass class as a paramater...

Lets Take an example

//----------- Class a -----------------
class a
{
    private int i;
    a(int j)
    {
        i = j;
    }

    public void print()
    {
    System.out.println(i);
    }
}


//----------------- Class b
class b
    {
        b(a A)
        {
            A.print();
        }
    }


//---------------- Main Class which is controlling the other classes    
public class c
{
    public static void main(String args[])
        {
            b B1  = new b(new a(10));
            b B2  = new b(new a(10));
        }
}       

Here i have taken two class a and b, while c is only for central controlling the two. b class constructor takes a class parameter and print it in the constructor.

Majestics 84 Posting Pro

First of all you dont have Card Class, thats why it is giving cant find symbol error.
Second you cant call non-static objects from static functions because static has more life then non static thats why compiler stops you from doing this.

Majestics 84 Posting Pro

Thats what is pointed in this link... You need a manifest file.
1) Create a text file name manifest
2) write -> Main Class: your mainclass name where your main function resides
3)goto cmd and write jar -cvfm manifest.txt yourjarname.jar yourclasses.class

I atleast earn a point for this... :)

Majestics 84 Posting Pro

http://docs.oracle.com/javase/tutorial/deployment/jar/appman.html
this page explains every thing you require.

Majestics 84 Posting Pro

Your Problem : Scope of variable "i" is only to loop.
Try to declare a variable before for loop and use it inside for statement.

int i;
for(i=0;i<size;i++)
Majestics 84 Posting Pro

Do you have idea of creating manifest file?

Majestics 84 Posting Pro

We are not here to solve your assignements by reading this big requirement. Paste your code here and ask for specific help.

Majestics 84 Posting Pro

I remember i used to initialize the head with the first linked list address in C/C++ language. But in java there are no addresses concept, Jvm handle pointer for you. So instead of making traditional linked list in java like c/c++ , why dont u try something new. Also LinkedList classes are available in java, then why are you re-inventing the wheel.

Majestics 84 Posting Pro

Look creating a web browser isnt that simple, u can use already deployed project to understand the working or extend them like http://lobobrowser.org/java-browser.jsp. If you want to open URL in a webbrowser like firefox or IE then use JDESKTOP Api. Hope this Help...

Majestics 84 Posting Pro

Seems like u want to abort a thread cleanly if it fails to complete in a desired time. I think "interrupt" is one of the possible way's, u need a exception handler in which u can print a message or empty as u desire....

Majestics 84 Posting Pro

Reduce the number of column from 50 to 30....

incoming = new JTextArea(15, 30);

Your Text is appearing but isnt adjusting over frame correctly...

Majestics 84 Posting Pro
Majestics 84 Posting Pro

Check are u intializing each drawObjects before you use it

drawObjects[i] = new Shapes(); // Are u doing like this.........................
Majestics 84 Posting Pro

Start from 0 for Sunday....

Majestics 84 Posting Pro

Well according to my opnion better practice will be making a textfield and a small beautiful button with it. Disable text field. When the user press the button the message box display and ask for data and display it in textfield...
And i think you need confirmation box , not the messagebox.

Majestics 84 Posting Pro

all the fields which are created are enabled by default
use this code to disable items

object.setEnabled(false);
Majestics 84 Posting Pro
try
{
//------------- Write your code here
}
catch(Exceptiontype object)
{
//--------- What will happen when error generate.
}

Generally u can use "Exception" to handle all kinds of exception but its not a proper way because you cant understand different type of exception then... Search down exception type in documentation and implement them.

Majestics 84 Posting Pro

there is no need to mention auto increment explicitly , it will increment automatically when ever you insert a new row

further more the query must be like this

insert into Confirm(columnname) values(columnvalue)

Hope this Help......

nagatron commented: nice job. . I never thought my problem would be that easy. .hehe thank you +3
Majestics 84 Posting Pro

Just a little bit more explanation.....
YES, IT IS POSSIBLE, BUT ITS NOT ORACLE FEATURE, ITS RDBMS FEATURE.All the dbms software which support relational database system, support this feature as well.

Majestics 84 Posting Pro

Line 21

ArrayList <StudentArrayList> record = new record <StudentArrayList>();

What is this record? .......................... :)

It must be ArrayList

Majestics 84 Posting Pro

Use Round Function if u want to round the data
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html#round%28double%29

You can also format double to 2 digits by DecimalFormat class in java...
http://download.oracle.com/javase/1.4.2/docs/api/java/text/DecimalFormat.html

Majestics 84 Posting Pro

If there are more then one word, y dont u use InputdialogBox or textfield?

Majestics 84 Posting Pro
frame.setVisible(true);
Graphics g = canvase.getGraphics();
g.drawRect(0,0,50,50);

Getgraphics take graphics when frame is visible, You just have to get graphics after setting it visible.... Simple Solution :)

Majestics 84 Posting Pro

Check setPreferredSize function.

Majestics 84 Posting Pro

//--------- When Course Matches break from for loop else it will make matched again false.

if (courseObjects[i].equals(tempCourse))
{
matched = true; //Matched Course Code
break;
}
Majestics 84 Posting Pro
catch (SQLException ex) {
return false;
}

Add this and try again. As ur catch exception dont have return thats y u are encountering this error.

Majestics 84 Posting Pro

Yup I agree with @Ezzaral, You must create seperate functions for each of the code which are executing under cases... and call both function in case 3. :)

Majestics 84 Posting Pro

Switch statement is made to reduce if else statment, as u have only few condition ,y dont u use if else rather then switch... Still u want to use switch the in case 3 write both code of case 1 and case 2.

Majestics 84 Posting Pro
CASE 3:
CASE 5: fucntion();

This is the method for multiple choice in switch.

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

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

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

:) , Also urs one is correct.