i am writing a program that display bits against each character in the file.I am using a TextArea component for the main window and for each bit i draw a rectangle on to the JTextArea component i.e Bit 0 is drawn by setting the color of the rectangle blue and black for blue color.My Ram is 500 Mb.But the thing is when i try to open a file greater than 1.4 Mb size,my drawing process becomes very very slow.I can hardly move the sliderBar.so i need help for making this software more efficeint.