Click here to Skip to main content
15,889,034 members
Home / Discussions / Java
   

Java

 
GeneralRe: Something is wrong with the print command. Pin
Richard MacCutchan23-Oct-13 3:19
mveRichard MacCutchan23-Oct-13 3:19 
GeneralRe: Something is wrong with the print command. Pin
chdboy23-Oct-13 3:54
chdboy23-Oct-13 3:54 
Questionreplace Pin
Member 1030999420-Oct-13 2:21
Member 1030999420-Oct-13 2:21 
AnswerRe: replace Pin
Richard MacCutchan20-Oct-13 6:53
mveRichard MacCutchan20-Oct-13 6:53 
QuestionQuestion about java Pin
Araphat18-Oct-13 22:37
Araphat18-Oct-13 22:37 
AnswerRe: Question about java Pin
thatraja19-Oct-13 1:54
professionalthatraja19-Oct-13 1:54 
GeneralRe: Question about java Pin
Araphat21-Oct-13 3:55
Araphat21-Oct-13 3:55 
QuestionMalformedInputException in RandomAccessFile io Pin
Amer Rehman18-Oct-13 2:49
Amer Rehman18-Oct-13 2:49 
Hi

I am facing this problem in my code and I'm unable to solve the problem. I can view data in utf-8 text file and there seems no problem. But what is in the RAF file, I cannot find. Thanks.

static void writeDataFile(String urText){
		
		String strDataFilePath = "D:\\Documents\\JCreator Pro\\Font Images\\Images.dat";
		
		String token[] = urText.split("\t");
		
		RandomAccessFile file = null;
		
			try {
    			
    			file = new RandomAccessFile(strDataFilePath, "rw");
    			
    			for (int i = 0; i < token.length; i++){
    				
    				//remove newline char
    				token[i] = token[i].replaceAll("\n", "");
    				
    				//write index
    				file.writeInt(i);
    				
    				//every even entry is png file path
    				int remain = i % 2;
    				
    				if ( remain == 0){
    					
    					//this will be Urdu text
    					file.writeUTF(token[i]);
    				}
    				else{
    					
    					//write png file path
    					//need to adapt according to resource path    					
    					file.writeUTF(token[i]);
    				}
    				
    			}
    			
			        						
			}
			catch (IOException ex) {

				System.out.println (ex);
			}
			finally{
				
				try {
					
					//close file
					file.close();
    
				}
				catch (Exception ex) {
					
					ex.printStackTrace();
				}
				
			}
    	

    }

SuggestionRe: MalformedInputException in RandomAccessFile io Pin
Richard MacCutchan18-Oct-13 7:02
mveRichard MacCutchan18-Oct-13 7:02 
GeneralRe: MalformedInputException in RandomAccessFile io Pin
Amer Rehman19-Oct-13 9:14
Amer Rehman19-Oct-13 9:14 
QuestionAdd KeyListener to tabbedPane(Tab) Pin
chdboy17-Oct-13 21:44
chdboy17-Oct-13 21:44 
QuestionRe: Add KeyListener to tabbedPane(Tab) Pin
Richard MacCutchan18-Oct-13 0:48
mveRichard MacCutchan18-Oct-13 0:48 
AnswerRe: Add KeyListener to tabbedPane(Tab) Pin
chdboy18-Oct-13 20:44
chdboy18-Oct-13 20:44 
Questioni need application like taking 3drop down list in 1dropdown country names and 2nd state name and third city name..can u please help in this application...............? Pin
yadagirirao aileni16-Oct-13 23:57
yadagirirao aileni16-Oct-13 23:57 
AnswerRe: i need application like taking 3drop down list in 1dropdown country names and 2nd state name and third city name..can u please help in this application...............? Pin
Bernhard Hiller17-Oct-13 2:13
Bernhard Hiller17-Oct-13 2:13 
AnswerRe: i need application like taking 3drop down list in 1dropdown country names and 2nd state name and third city name..can u please help in this application...............? Pin
Member 1034425418-Oct-13 1:18
Member 1034425418-Oct-13 1:18 
AnswerHow to establish connection between JAVA & MS SQL Server ? Pin
Amol Lendave16-Oct-13 1:17
professionalAmol Lendave16-Oct-13 1:17 
QuestionRe: How to establish connection between JAVA & MS SQL Server ? Pin
Richard MacCutchan16-Oct-13 2:56
mveRichard MacCutchan16-Oct-13 2:56 
AnswerRe: How to establish connection between JAVA & MS SQL Server ? Pin
Amol Lendave16-Oct-13 20:49
professionalAmol Lendave16-Oct-13 20:49 
GeneralRe: How to establish connection between JAVA & MS SQL Server ? Pin
Shubhashish_Mandal16-Oct-13 21:00
professionalShubhashish_Mandal16-Oct-13 21:00 
GeneralRe: How to establish connection between JAVA & MS SQL Server ? Pin
yadagirirao aileni16-Oct-13 23:59
yadagirirao aileni16-Oct-13 23:59 
GeneralRe: How to establish connection between JAVA & MS SQL Server ? Pin
Richard MacCutchan16-Oct-13 21:13
mveRichard MacCutchan16-Oct-13 21:13 
GeneralRe: How to establish connection between JAVA & MS SQL Server ? Pin
Amol Lendave16-Oct-13 22:59
professionalAmol Lendave16-Oct-13 22:59 
QuestionHow to Align Radio Buttons in MigLayout? Pin
chdboy16-Oct-13 0:42
chdboy16-Oct-13 0:42 
QuestionJScrollPane is not showing the frame properly Pin
chdboy14-Oct-13 19:36
chdboy14-Oct-13 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.