Create A Program That Will Deny Access To Browsers During Certain Times Of Day

Jan 2, 2014

My goal here is to create a program that will deny access to the browsers during certain times of the day. The research that I have done makes this out to be near impossible (using signal handlers in java). where to start, if its possible, or anything else im missing. (System is windows 7).

View Replies


ADVERTISEMENT

How To Make A Program Run Multiple Times

May 18, 2014

I have made a basic math game that asks you questions and tells you if you have answered them correctly or incorrectly. The game runs great! The thing is that it asks you a question one time and after you answer you have to run the program again. I want to get the program to ask ten questions. After that I want to figure out a scoring system for it but the first step is to get it to ask my ten questions. Here is my code.

package pkgnew;
import java.util.Scanner;
import java.util.Random;
public class New {
public static void main(String args[]) {

[Code] .....

View Replies View Related

Applets :: Code Works Fine With All Browsers Except CHROME

Mar 26, 2014

i am calling a method of my applet from within the javascript. My code works fine with all browsers except CHROME.i get this exception in browser = "Uncaught TypeError: Object #<HTMLObjectElement> has no method 'loadComplete' mainControl.js:6". i called this method on the "onload" of <body> tag.

View Replies View Related

How To Get A Program To Repeat X Amount Of Times Automatically

Oct 27, 2014

Ii am trying run a do while loop on java a specific amount of times for example if i were to type in "Enter number of years" and enter 4. i need the loop to execute 4 times or if i said 6 times then i would be 6. the program i have repeats it and takes it back to reentering "Enter number of years" i need it to execute by its self x amount of times. here is what i have so far

System.out.println("Enter the number of years: ");
years = keyboard.nextInt();
rainfall = generator.nextInt(10) + 1;
System.out.println("Year " + "rainfall amounts were");;
for (int months = 1; months <= 12; months++)

[Code]...

View Replies View Related

Program That Counts How Many Times A Letter Is Written

Sep 29, 2014

I can't get my code to print it like it's on the picture.

import javax.swing.JOptionPane;
import java.util.*;
public class BokstavTeller
{
public static void main( String[] args ) {
String input = JOptionPane.showInputDialog(

[Code] .....

View Replies View Related

Access Denied To Create Class File

Aug 10, 2014

I am new to java. While compiling the "moooooo" program an error is displayed.

Error -- error while writing MooseGreetings :MooseGreetings.class
<access denied>.

What to do?

View Replies View Related

Servlets :: HTTP GET Default Method For Web Browsers Contacting Web Servers?

Sep 5, 2014

I am running a test servlet on Tomcat and have implemented different behaviours for the doPost and doGet methods. When I access from the browser, only the doGet method gets called ultimately.

The Firefox developer tools show me a GET request from the browser to my Tomcat instance. Do browsers ever call the POST http method? How could I make this happen?

View Replies View Related

Unable To Set Text To A Label Multiple Times In Same Program

Aug 5, 2014

I am developing a java swing application. In which i want to set a different text to a label in same program ( in single JFrame). I dont want to use another JFrame instead i want to use setText method of java and set different text to a label at different intervals of time according to my need.

I am using java 1.7 sdk and pupy linux as OS. Below i am giving source code.

What i am doing is in constructor of class i am setting an image to JFrame and setting text "Welcom...". And when user clicks on this JFrame a method is called which will clear the text "Welcome.." and sets new text to another label "Enter...." and from there another method is called and it clears label "Enter..." and sets a text "Plzz wait..". and yet there are more methods, i havnt provided here.

But what is happening is it shows welcome text and then directly Plzz wait..

Its not showing text Enter... because control is finished after last method gets executed.

My concern is i want to show all the setText (my messages) in a sequence. Without using another JFrame. There is no any user input other than user will click on first welcome page.

public class BackgroundFrame extends javax.swing.JFrame {

JLabel setTitle1;
JLabel setTitle2;
JLabel setTitle3;
JLabel setTitle4;

[Code] ....

View Replies View Related

Program To Roll 1000 Times And Count How Many 7s Rolled

Nov 15, 2014

public class PairOfDice
{
private Die die1, die2;
public PairOfDice() {
die1 = new Die();
die2 = new Die();

[Code] .....

I am struggling with the final part of my code to get the dice to roll 1000 times and tell me how many times a 7 was rolled. I am getting these errors in jgrasp

----jGRASP exec: javac -g PairOfDice.java

PairOfDice.java:34: error: <identifier> expected
count = 0;
^
PairOfDice.java:35: error: illegal start of type
for (rep = 1; rep <= 1000; rep++) {

[Code] .....

22 errors

View Replies View Related

Connect Java Program With MS Access

Apr 5, 2014

I want to connect java program with Ms access.

View Replies View Related

Opening Folder Through Java Program / Access Denied

Jun 23, 2014

want to open a directory from java program in Ubuntu When i use exec(path) it says access denied.

View Replies View Related

Reading Text File Into Object Array And Create Random Access File

Dec 9, 2014

I am working on a project that requires me to build a database with random access file, representing products, the base product contains a name (about 30 characters), a price (double), and a quantity (integer). I have worked on this project for probably 15+ hours and have tried so many things and feel like I've barley made any progress...

The part i am really struggling with is taking the data from the text file and creating an object array with it using the product class. Once ive accomplished that, i have to use that data to create a random access file with the data. Here is the base Product class that must be used to create the objects for the array.

public class Product
{
public String pName;
public String stringName;
public double price;
public int quanity;

[Code]...

these continue for about 40-50 entries, they are not seperated by a blank line though i had to add those so it would display correctly, each entry is on its own line with name seperated with spaces, then price after a comma, then quanity after the second comma.....

View Replies View Related

Create Little Program Which Enter Number / Program Says Triangle Exist Or Not

Mar 16, 2014

i want create little program which enter the number, ant program says triangle exist or not. So code :

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

[code]...

So when i put first num like 1, next num like 2 and next num like 100 , program says Triangle exist.

View Replies View Related

How To Create A Coins Program

Feb 16, 2015

Ive been trying to create a program to say how many 5cent,10 cent and 50 cent coins there are if you put a number in example 20. I used the init method because thats what the teacher told me to use but i have no clue on what to do.

View Replies View Related

Create Parking Program

Nov 8, 2014

i need to crate a Parking program

Java Code:

import java.util.*;
class xxx
{
public static void Parking (String args[])
{

Scanner snip = new Scanner (System.in);
System.out.println("Enter time:");
int Enter_time1;
int Enter_time2;
Enter_time1= snip.nextInt();
Enter_time2= snip.nextInt();

[code]....

View Replies View Related

Create Payroll Program

Jun 14, 2014

I am now at the beginning trying to teach myself Java :) So far it has been good everything however now I came across the problem where I wanted to create payroll program for myslef based on one of the books I have.Somehow the issue in provided program code gives me the negative values on the salaryNett and valueTax:

Java Code:

import javax.swing.JOptionPane
public class FinnancialApplicationPayroll {
public static void main (String[] args){
String input = JOptionPane.showInputDialog (null, " What is your name");

[code]....

View Replies View Related

Program That Asks To Create 2 Arrays

Oct 24, 2014

I'm just learning about arrays. I have a small program to write that asks to create 2 arrays. One holding 5 names of flowers. One holding the prices of those 5 flowers. I ask the user what kind of flower they want and the quantity. I then need to create a loop that locates the flower name and uses that index to find the cost of the flower. I am struggling on how to write in code how to use one array index to find another. Example: Roses and $.50.

View Replies View Related

Create A Program Called MyStack

Apr 15, 2014

We have to create a program called MyStack.In Push: Add one element at the end of the buffer.In Pull: Remove one element from the end of the buffer. In isEmpty: Should check if the list is empty or not and return the result as a boolean variable.

I am totally confused, I wrote the buffer and the array, but how do i add an remove element from the buffer?How do i add an element? What Statement do i Use?

Java Code: public class MyStack<T> implements Stack<T> {
private final T[] ringbuffer;
int index = 0;
int last;

[code]...

View Replies View Related

Create A Program That Will Calculate Different Tax Brackets

Oct 3, 2014

I have spent the past 12 hours on it and have gotten no where. I need to create a program that will calculate different tax brackets. I have tried all combinations I can think of and can't get it to work!!! I am literally about to go insane! I need the program to calculate tax will be 1% for anything up to $50000. If the tax is over $50000, you keep that 1% of $50000 and then add the remaining. So for an income in the second range, it would be 1% of $50000, and then 2% of (income - $50000). This then continues for each range.

The problem I'm having is getting it to display the correct interest rates. I am not asking for you to write it for me. I want to learn. But at this point I have exhausted all resources available to me.

import java.util.Scanner;
public class Project3taxinfo {
public static void main(String[] args) {
final double RATE1 = 0.01; //1% tax on the first $50,000
final double RATE2 = 0.02; //2% tax on the amount over $50,000 up to $75,000
final double RATE3 = 0.03; //3% tax on the amount over $75,000 up to $100,000
final double RATE4 = 0.04; //4% tax on the amount over $100,000 up to $250,000
final double RATE5 = 0.05; //5% tax on the amount over $250,000 up to $500,000
final double RATE6 = 0.06; //6% tax on the amount over $500,000

[code]....

View Replies View Related

Create Program That Prints Time Between 00:00 (0:00 Am) And 23:45 (11:45 Pm)

Feb 8, 2014

I was told to create a program that prints the time between 00:00 (0:00 a.m.) and 23:45 (11:45 p.m.) in the 24-hour clock and 12-hour clock format like this:

24-hour Clock 12-hour Clock
-----------------------------
00:00 0:00 a.m.
00:15 0:15 a.m.
00:30 0:30 a.m.
00:45 0:45 a.m.
01:00 1:00 a.m.
01:15 1:15 a.m.
01:30 1:30 a.m.
01:45 1:45 a.m.
02:00 2:00 a.m.

ect...

but cant seem to create the program and my program doesnt seem to run.

View Replies View Related

Create A Program That Will Check If One Statement Is Equal To Another

Dec 5, 2014

I'm suppose to create a program that will check if one statement is equal to another but it doesnt display the message if its equal to the inputted String

import java.util.Scanner;
 
public class sup {
public static void main (String args[]) {
Scanner in = new Scanner (System.in);
String one;

[code]...

thats just an example I was able to do it in C++ but it doesnt do what I want in Java

View Replies View Related

Create A Program That Asks User For Array

Mar 3, 2014

i need to create a program that asks the user for an array and then asks the user to fill in the slots of the array but i have to do it in a method

View Replies View Related

Create A Program That Display Video In Second Monitor

Mar 12, 2014

create a program that display video in second monitor ....every time i run my code it display the video in first monitor not in second monitor .. Here my path i used

private static String mplayerOptions = "mplayer -noborder -vo fbdev2 -nokeepaspect movies.mpeg";

View Replies View Related

Write A Program To Create Dynamic Maps

Apr 15, 2014

As per requirement i need a dynamic multi map in my application. How to write a method to create the dynamically map.

View Replies View Related

How To Create A Driver Program That Invokes A Class

May 13, 2014

Assignment:

Create a class; call it Lab4a that will have one method called pull. This method does not return anything and requires no parameters.

-In the method, create three random integers in the range 1 to 7. The method will then display the three numbers to the terminal window.

-Now create a driver program, called SlotMachine, to invoke the pull method of the Lab4a class.

-As a refresher, you will have a main method in the driver class that will create an object of Lab4a and then use the only method of this object.

-In your driver program, invoke the roll method 10 times.

-See the back of this lab for an example of the output.

This is what I have so far.

Slot machine

import java.util.Random;
public class Lab4a {
public static void main (String[]args) {
Random pull=new Random();

[code]....

View Replies View Related

Create A Program That Allows User To Enter A Day Using A Number

Oct 13, 2014

so I had to create a program that allows the user to enter a day using a number and then enter a year and after they did that it would create an entire calendar for that year ..so I have that but the only issue is I can not get the numbers to line up neatly.how to do the entire thing in loops, I tried a couple in here..what this would look like as loops instead of switches and cases and if else

import java.util.Scanner;
public class Calendar {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
 
[code]....

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved