You would need to download the JRE, but I'd say your friend probably has it. If he don't, then it's no big deal to download it.
You would need to download the JRE, but I'd say your friend probably has it. If he don't, then it's no big deal to download it.
Java has a really nice security package that will do everything for you.
Thanks for all the help. I'm not too worried about users not trusting it, since no one will probably ever look.
I think it's pretty cool. My neighbor gave me an old monitor, but the graphics didn't look to good with my little laptop! I saw get you one of those dual core gpu's that's coming out next year and it will look just fine.
I hate to post an external link, but take a look at this:
http://www.wizardsolutionsusa.com/forum/showthread.php?t=100
So the only thing the user will see is a 'certificate' that they can click ok or yes to, right? I thought I read something last night that involved passwords and stuff.
I have a weird question. I'm trying to access a .txt file from a java applet, which would reside locally. When running this with the applet viewer, everything works fine. When you click on the .html file, however, you get an accesscontrolexception. I find it weird that the applet viewer works fine, but when you actually click on the .html file, it doesn't work right. Is there a reason for this?
PS: Do you REALLY need to sign an applet that uses a local file?
I made an ImagePanel to host the background image. The JScrollPane has a viewport, which seems to act sort of like a JPanel (visually) underneath the actual component that you see. Setting the viewport to no be opaque didn't work, so I added my tree to an ImagePanel then set my viewport to the image panel.
So the Image is actually covering up the scrollpane? What are you adding to the scrollpane?
Do you mind posting a picture of the app. without the image so that we can see the scrollpane?
p.s. Nice java links server_crash, that wireless was a nice read
Thanks ;) I probably should change some of the text colors!
I'd like to recommend putting the drawing in a seperate class. It always seems to make errors easier to fix that way.
I take one once a month, sometimes every two months. It just depents.
cout<< *max_element ( v.begin(), v.end(), length() ) <<'\n';
That's pretty sweet. I guess mine was blown way out of proportion.
This is my try at it. It may not be very good, but it works.
#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using std::cout;
using std::endl;
class Sort_By_Length
{
public:
enum sort_mode {ascending, descending};
//constructor for sorting criterion
//-default criterion uses value descending
Sort_By_Length(sort_mode m=descending): mode(m) { }
//comparison of the elements
bool operator() (const string& s1, const string& s2) const
{
return (mode == descending ? s1.length() > s2.length() : s2.length() > s2.length());
}
//comparison of the sorting criterion
bool operator== (const Sort_By_Length& sbl)
{
return mode == sbl.mode;
}
private:
sort_mode mode;
};
typedef set<string, Sort_By_Length> String_Set;
void fill_set(String_Set& set);
int main()
{
//create, fill, and print set with normal element order
//-uses default sorting criterion
String_Set coll;
fill_set(coll);
copy(coll.begin(), coll.end(), //range
ostream_iterator<string>(cout, "\n")); //destination
cout << endl;
}
void fill_set(String_Set& set)
{
set.insert("reallylarge");
set.insert("small");
set.insert("medium");
}
Why not use a Set and specify the string size as a sorting criterion? That way, when you want to find the longest or shortest string it would be a one liner.
Here's your problem:
cust.check_type(type,balance);
You're calling that method on a vector?
Use a Random object or something:
Random random = new Random(2);
int rotation = random.nextInt()+1;
No it isn't the names are in quotations.
I don't know what I was thinking. I swear I saw curly braces instead of parenthesis.
Student[] values = { new Student("Tom", 87),
new Student("Cindy", 100),
new Student("Pat", 75),
new Student("Anne", 92),
new Student("Matt", 82)};
Shouldn't that be a 2D array?
setBounds(int, int, int, int); offers the most control.
I want in the printf function to print this Question with each element
Why use printf? Just use cout.
Also, why use a char array when the STL provides a string class?
If it's three or MORE people then use a vector since you don't know the exact size.
Don't you hate crappy tech support, especially when they can't speak english? I spent weeks trying to comunicate with Dell, but you can't when they're from India or whereever they pick them these days. Personally, it makes me feel better if I yell at them and make them feel as stupid as possible.
My advice: Read reviews before buying a computer. That will steer you away from Dell everytime. Secondly, if you have to buy replacement parts, either buy another computer with quality, or pick the parts out yourself so you don't pay full price for very low quality parts.
Couldn't have said it any better.
Maybe use an imagefilter. If not that, then start shifting some bits.
I love some of his philosophies and ways of dealing with things.
Try:
cout << "\\" << (an expression) << "\\";
\ is an escape sequence, so you must treat it with extra care.
Take a look at your loop:
for (int j = 0; j >=1; j++)
Your condition:
j>=1
This is the same as saying "loop while that j is greater than, or equal to 1. You start your counter j=0 which means j is zero (not greater than 1). It never executes the loop.
You can try the StringTokenizer which allows special delimeters. Also, I'm not sure a 2D array is the best way to go, but can't say for a fact that it's not. If you post your parsing code we could probably help more.
Are you frightened?
Only of Satan and his friends in those pictures.
Do you guys care?
Nope.
Why would boys want girls overalls?
:eek: Ooooooohhhhhh, another burn by the spellchecker.
I don't care what color the box is as long as they leave me an entertaining comment.
Any funny comment you care to share?
That's because you're a dork. ;)
I'm a sexy dork. Anyways, I thought it may have been from 'always giving the wrong answers' as some turd put it, or being rude and arrogant as another turd put it.
Dani,
Did you ever figure out why this was happening? I'm having some problems with blogging software that doesn't seem to send the confirmation.....I think it gets stuck in the spam box or the email client simply blocks it.
Opps, you might want to take the x = y/10 out of the loop. There's no reason to do that 10 times!
Yeah, you've got a problem with the loop. Fix that, and then I'll take a look at the rest.
for (int i = 0; i < 10; i++)
{
x = y/10;
System.out.print("*");
}
You want to increment while a condition is true. For instance, in this case we start with:
i = 0;
which is our couting variable.
The second thing is the condition. The condition here is:
i<10;
That means we will keep looping as long as 'i' is less than 10.
The third thing in the loop, is the increment statement. In this example:
i++
means that for each round in the loop, 'i' will be incremented by one. The first time you program runs the looping looks like this;
i=0
i IS less than 10
i is incremented by one(now it is 1)
a start is printed
Second time:
i=1 //from the first increment
i is still less than 10
i is incremented //now equals 2
Another star is printed.
It goes on and on until the looping condition is not true(i is greater than or equal to 10).
I don't see any code taking input. Look into the bufferedreader.
You have semi-colons after the if, and else statements. They shouldn't be there.
Shouldn't these be parsed:
Mort = answer.getText();
Int = answera.getText();
T = answerb.getText();
MonthPay.setText( "$" + (Int - (Mort * Int * T)) / (T*12));
T = Integer.parseInt(answerb.getText());
Also, don't you want to use doubles?
If you're working with strings this might work (not tested), but it looks like dragons solution is probably what your looking for.
bool find_string(ifstream& file, const string& search)
{
string line = " ";
while( getline(file, line, '\n') )
{
if (line == search)
{
return true;
}
}
return false;
}
Just what I thought, there's another class.
The class is called:
MagNCanv.class
You're right. I forget about that! The values are suppose to wrap around. Hmm, that makes it even harder.
The only other thing I can think of is some kind of conversion that causes an underflow.
What about making it to where we can have our own custom titles?
float.MIN_VALUE-1
I think.
Can you not just create an AudioClip object with the corresponding URL and then call the play() method on it?
Hmm. After looking at it I would tend to think it's in multiple classes. Is there an error you recieve while trying to run it? Down in the task bar(bottom right), look and see if there is a coffee mug icon. If there is, right-click on it and select show console. Copy everything it shows in the console.
I think there is more than one class file, but there's really no way to tell unless you have a look at the source code. Is there any way you can post it? If it's a lot then just attach it.
Few possibilities:
You don't have the html to run the applet.
The applet has one or more .class files and you don't have them all.
There's security contained in the applet(for example, checking to see that it is run from the makers domain).
I would say you don't have all the class files. With the larger applets I am sure there's more than one class. Without those extra classes, you wont be able to run the applets.
Applets extend JApplet not JFrame ;)
Hmmmm.... Maybe add a component listener to your JFrame(extending Component Adapter). Then you should get a method labeled componentResized(). In that method you need some custom checking.
Wait, if you're using an older version of java, then that might be the reason. The newer 1.5 has a much nicer look and feel than older versions. So I guess I can see where you're coming from.
You know there's a UI manager, right? Programs on windows platform should have the windows L&F, and so on.
Where you get very, very, very ugly I don't know. Maybe it's just your design/layout/colors.
He did bad things, he did good things. I really like some of his philosophies, though. Some people believe they were far too radical and idiotic, but I find a lot of them fit for use.