Results 1 to 2 of 2
- 05-10-2011, 05:55 AM #1
Member
- Join Date
- May 2011
- Posts
- 2
- Rep Power
- 0
so i need help finishing my histogram plz help
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MyProject
{
public class MyGraph extends JFrame
{
DrawPanel drawArea=new DrawPanel();
int winWidth;
int winHeight;
public MyGraph()
{
setTitle("Name popularity ");
getContentPane().add(drawArea);
drawArea.setBackground(new Color(0,255,0));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
}
class DrawPanel extends JPanel
{
public DrawPanel()
{
winWidth=400;
winHeight=400;
setPreferredSize(new Dimension(winWidth,winHeight));
}
protected void paintComponent (Graphics g)
{
super.paintComponent (g);
double xmin=-2*Math.PI;
double xmax=8*Math.PI;
double ymin=-2;
double ymax=2;
double x,y,xold,yold;
MyWorld w2p= new MyWorld(xmin,xmax,ymin,ymax,300,300);
}
public class FileInput
{
public static void main(String[]args) throws IOException
{
BufferedReader kb_in=new BufferedReader(
new InputStreamReader(System.in));
System.out.print("Enter the name of the file to be read:");
String filename=kb_in.readLine();
BufferedReader file_in=new BufferedReader(
new FileReader(filename));
System.out.println("Contents of file:");
String line=file_in.readLine();
while(line !=null)
{
System.out.println(line);
line=file_in.readLine();
}
}
}
}
}
}
- 05-10-2011, 06:04 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Please give more details and edit your post to have your code in code tags.
To add code tags do this
[code]
YOUR CODE HERE
[/code]
As to giving more advice, please provide exact error message if there are errors, and also ask some specific questions rather than just dumping code.
Similar Threads
-
need help with name histogram
By cachico12 in forum New To JavaReplies: 1Last Post: 05-09-2011, 08:27 AM -
The last stumbling block to finishing a project: Checking if already used
By sarevok9 in forum New To JavaReplies: 11Last Post: 04-26-2011, 07:55 AM -
JAI Histogram error
By deepsri in forum Advanced JavaReplies: 0Last Post: 01-07-2011, 10:06 AM -
finishing up a DB/Java exercise
By hayden06f4i in forum New To JavaReplies: 47Last Post: 12-12-2010, 09:57 PM -
histogram
By little_man in forum New To JavaReplies: 4Last Post: 11-13-2010, 01:38 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks