Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #2K
~9K People Reached
Favorite Forums

20 Posted Topics

Member Avatar for sincerelibran
Member Avatar for jouj
-1
752
Member Avatar for caswimmer2011

Are you looking at code to open the txt file and display the same or reading the file and processing

Member Avatar for vadayattu
0
232
Member Avatar for churva_churva
Re: GUI

One of the easiest way would be, if you don't intend to add any components to the main frame [CODE]JLabel lab = new JLabel(new ImageIcon("full file path")); frame.setSize(500,200); frame.add(lab); frame.setVisible(true); frame.setResizable(false);[/CODE] If you want to put the Image to the whole screen then you will have to get the scaled …

Member Avatar for churva_churva
0
163
Member Avatar for LianaN

I am not sure about SAXBuilder but the below code will work DocumentBuilderFactory dBF = DocumentBuilderFactory.newInstance(); DocumentBuilder dB = dBF.newDocumentBuilder(); Document doc = dB.parse(new File(xml File Name)); //Now use Node/NodeList and read the data

Member Avatar for LianaN
0
873
Member Avatar for SeanC

Best way is create a Folder lib in your Project and place your project depending Jar files into it and and map the library for compile to the lib folder, ship the project with the lib file.

Member Avatar for vealparry
0
130
Member Avatar for cozmo87

If its txt file, one of the way is to create a third file with both the data FileInputStream fi = new FileInputStream(File1); BufferedReader br = new BufferedReader(new InputStreamReader(fi)); FileInputStream fi2 = new FileInputStream(File2); BufferedReader br2 = new BufferedReader(new InputStreamReader(fi2)); String strLine; while ((strLine = br.readLine()) != null) { String …

Member Avatar for vealparry
0
149
Member Avatar for WolfShield

Rt Click the Project Option in Design and select Event > Action > actionPerformed now enter the below code for actionPerformed. [CODE]JFileChooser fileChooser = new JFileChooser("."); fileChooser.setMultiSelectionEnabled(true); fileChooser.setMultiSelectionEnabled(true); int status = fileChooser.showDialog(this, "Import"); if (status == JFileChooser.APPROVE_OPTION) { JOptionPane.showMessageDialog(this, "Done"); }[/CODE]

Member Avatar for vealparry
0
110
Member Avatar for Member #884252
Member Avatar for Sonny101

you need to import the util calender [CODE] import java.util.Calendar;[/CODE]

Member Avatar for Sonny101
0
145
Member Avatar for LianaN

try the below code [CODE]for (Component comp : mainPanel.getComponents()) { if(comp instanceof JLabel){ mainPanel.remove(comp); }[/CODE]

Member Avatar for LianaN
0
133
Member Avatar for muloki

Your code is messed up Use the below Code inside your For Loop [CODE]JTextField jt = new JTextField(); jt.setSize(new Dimension(30,20)); jt.setText(text); int val =(i+1)*10; jt.setLocation(val, val); sell.add(jt);[/CODE]

Member Avatar for vealparry
0
183
Member Avatar for muloki

First set the model like below [CODE]setModel(new javax.swing.table.DefaultTableModel( new Object[][]{}, new String[]{ "Product", "Price", "Stock", "Code", "Amount Sold" })[/CODE] try the below code to add data to the table [CODE]model = (DefaultTableModel) jTable1.getModel(); ...... Object[] obj = {list[0], list[1], list[2], list[3], list[4]}; model.addRow(obj);[/CODE]

Member Avatar for vealparry
0
4K
Member Avatar for forfreaks
Member Avatar for vealparry
0
114
Member Avatar for rohit2

JTextPane will always be inside the JScrollPane, you need to check the JScrollPane and get/set text to the JTextPane. If you can post some code will be more easier to provide help

Member Avatar for pbl
0
113
Member Avatar for blueman:-0
Member Avatar for scobi

Did you ever checked your code before posting, change the code as below internalFrame1.setBounds(5, 5, 788, 200); JRadioButton r = new JRadioButton("test"); r.setBounds(50, 50, 50, 20); internalFrame1.add(r); JRadioButton r1 = new JRadioButton("test1"); r1.setBounds(80,80,60,20); internalFrame1.add(r1); internalFrame1.getContentPane().add(b1); internalFrame1.setVisible(true); internalFrame1.setBackground(Color.RED); JPanel panel1 = new JPanel(); panel1.setBackground(Color.red); panel1.setForeground(Color.BLACK); panel1.setLayout(null); panel1.add(internalFrame1); JDesktopPane dtp = new …

Member Avatar for vealparry
0
461
Member Avatar for rohit2

One of the way to do is JLabel lab = new JLabel("Checking"); lab.setPreferredSize(new Dimension(200,40)); jTabbedPane1.setTabComponentAt(0, lab);

Member Avatar for vealparry
0
118
Member Avatar for rohit2

One of the way is String text = jTextPane1.getText(); text = text.substring(0,jTextPane1.getCaretPosition())+" "+ jTextField1.getText() + " " +text.substring(jTextPane1.getCaretPosition()); jTextPane1.setText(text);

Member Avatar for vealparry
0
91
Member Avatar for Janu Sam

If your GUI exceeds the Display support you can do following. 1.Put inside ScrollPane > which you can scroll even if the screen is smaller. 2.Design the GUI for lower resolution and resize the frame when screen size is bigger.

Member Avatar for vealparry
0
145
Member Avatar for FerrousRex

If you just want to display the PPT or ODT file using the default application installed in windows then use the following command File dest = new File("fileLocation\\fileName" + ".odp or .ppt"); Desktop.Action act; act = Desktop.Action.OPEN; Desktop desktop = Desktop.getDesktop(); desktop.open(dest);

Member Avatar for vealparry
0
110

The End.