could you go step by step with me?
ok so, made the GUI:
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
*
* @author User
Type: Posts; User: Ajan
could you go step by step with me?
ok so, made the GUI:
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
*
* @author User
from my last post. how would i start the print method?
keeping in my mind:
Must print multiple lines
Must print multiple pages
Must print within its borders.
So can you guide me through this...
norm i think im screwing up here :/..
i wanna start from the beginning.
public class Printer implements Printable{
public static void main(String args[]){
}
public int print(){
ok so i dont get syntax errors, just visual errors.
Say like i type into the text area:
Hello my name is slim shady.
Hello
it will repeat itself multiple times(on top of each other.)
Ok, im trying to make a notepad, and i am trying to get the print method to work as i want it to.
1) Must print multiple lines
2) Must print within a certain area
3) Must print more than one...
Soz norm for the long wait for my reply. I was away for easter and came back to see my pc was broken. All fixed now.
Ok so can you help me through this?
ill start of, can you guide me...
norm, my problem is i cant figure out a printing method where it will print multiple lines and keep within the margins at the same time.
so atm i dont know how :S
I think i need to do another approach to the printing method, does anyone else have another way in which i could try?
yea but the thing is, if i hard code a string it wont work the way i want it to. as you can see, i want the user to print all text on the text area.
im trying to make the program atm print out the...
norm, the code i showed earlier makes a file with the text from the text area and then reads the file with it. i did this to use the x.next() method for the while loop and make so i can have this...
Here is the code:
it follows this:
Make a new file with the data on it
open file
make a scanner
make a while loop that will read the text on it
then String data = data + "/n" + x.nextLine();...
i tried it yesterday, doesnt work :/ just prints the line together.
I suggest you downloading netbeans it has a visual editor, where you can drag and drop your GUI components onto a frame. Since you are new, netbeans would be ideal.
^ would this work?
dont you read? you need to make a introfuction post, not a question post.
@snow will i get banned now? i never knew that you couldnt do it for the people who asked. ill keep this in mind for the next question, soz
Dude you just in luck, i made one of this for my cipher.
ok you need to understand, my explanations and self reasoning are all messed up. I do stuff that would confuse people...
So i had a...
the second link is a bit helpful to see a way, but then i will need /n through out the text. which i dont know how to replace blank spaces and then replace it.
im trying to get a way around it now,...
wow guess netbeans filled it out for me, and I never took note of it.
only problem now is, my lining isn't correct. If its multiple lines, it just gets printed as one. I dont know how to fix this...
Hey guys,
I know I'm new and all (And most of you will hate me for doing this).
But I got one small problem with printing.
As you see, i made my very own notepad. And I'm kinda stuck with...
Hey guys,
My name is Adam, I live in South Africa and I'm 17 years old. <-- Epic grade 1 intro :D?
Anyway this will be my second year for java programming. I find programming quite easy from...