This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

david foley

Ranch Hand
+ Follow
since Dec 01, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by david foley

K. Tsang wrote:You need to get only one URL each time.

Looking at your for loop, you seem to be missing the index

Or you may just want to use the for-each loop.

Edit: how come you for loop is
int x=0; arrayImage.size()<x; x++

rather than
int x=0; x<arrayImage.size(); x++



Typo..

I change it to For Each



Getting No Errors but not able to see Icons.. might just leave it off
3 years ago

Darryl Burke wrote:

david foley wrote:So a am able to get the URL Link but getting that to a Image seems to be the problem


I would expect that to throw a MalformedURLException.




I am getting



But Get No Error when i have it this way
3 years ago
Hi i am currently creating a Twitter Application within Java Swing using JSON

i have the JList populating with Home feeds but i also want to get Images displaying next to the Text

currently all i am getting is
http://pbs.twimg.com/profile_images/425056422972248065/tsHhUvEe_normal.png
http://pbs.twimg.com/profile_images/472043355963006976/MjRINlxF_normal.jpeg

So a am able to get the URL Link but getting that to a Image seems to be the problem





3 years ago

Campbell Ritchie wrote:I can see another problem, I am afraid. Again you will never be able to fill that array. I think you are going to have to try that method and see what happens.



it was a two second job.. to point Sarah Candor in the right direction.. what you pointed out should help her with her project.
3 years ago
you could try something like




This is Un-Tested
3 years ago

currently I am watching java bean youtube vidoes would you recommend any

so the hbm2ddl only creates the tables, you cant use it to query the tables?

I havent Tried anything yet, i am looking at a Small project to build..
and was looking at doing the Data Model with Hibernate. what i meant by "manual entering in the queries", was with Hibernate you don't have to use INSERT INTO table_name
VALUES (value1,value2,value3,...); etc you can leave that up to the Auto Build.


but what i would like to know can this "Auto" build feature work with Searching for First name Last Name etc.

without me having to type in something like this

SELECT * FROM Customers
WHERE FNAME=value;

And have them Link that Query up to Text Fields.

I want this to be done only with Jpanels / jFrames i have yet to look at Spring or Struts to build something like this into a Web Application..
Hi all,

is there a way to use Hibernate with Swing without manaul entering in the Querys ?

What i would like is to have Hibernate.cfg.xml to look after the database Tables along with CRUD..
by using hbm2ddl.auto..

Within my Jpanel if i have two Buttons Next and Back would hbm2ddl.auto work with this to populate the JTextField with the Info.
Just wondering if some one could help me out with this, my list view is populating from Text File, when i use...
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity, android.R.layout.simple_list_item1, ListItems);

but what i would like to do is get the ListView populating with the Model Class,
which would then all me to click on an element inside the list view to send the URL across to another Activity class. so i can use WebView

my Text file looks something like this
Song#Date#URL,

all in the one line


Menu_Fragment


Model

Controller
3 years ago
Ok i am wondering what is the best way to go about this i am trying to have a Top Fragment and a bottom fragment,

The Top Fragment should Save String inside an EditText to a File Refresh send a Refresh request to the listveiw the list view should read the Text File and place the Text into the List View

The problem i am current having is with the Fragments
InputStream instream = openFileInput("myUsers.txt"); is telling me openFileInput cannot be resloved
this error is also happening in the Adduser Class
FileOutputStream fileOutputStream = c.openFileOutput("myUsers", Context.MODE_PRIVATE);
fileOutputStream cannot be resloved.






3 years ago

I got it Working,
I closed the brackets and then check if its Less then par.





3 years ago

I Tried the isEmpty Method,

Its the Fact that my Edit Texts are set to Int, and when i go to Delete a value inside the Edit Text it tries to Set "" which is giving me the Error even if i take out




it still tells me
java.lang.NumberFormatException: Invalid int: ""
at java.lang.Integer.invalidInt(Integer.java:137)
at java.lang.Integer.parseInt(Integer.java:358)
at java.lang.Integer.parseInt(Integer.java:331)
at com.example.dfoley.scorecard1.Score.hole1(Score.java:15)
at com.example.dfoley.scorecard1.MyActivity$1.afterTextChanged(MyActivity.java:62)
at android.widget.TextView.sendAfterTextChanged(TextView.java:7424)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:9194)

what i cant get is if i take that bit of code out this part works fine
public void ButtonClear()
{
MyActivity.T1.setText("");
MyActivity.T1.setText("");
3 years ago


The Text field only accepts Numbers, as pre. set inside the XML, i tried something in the lines of



but giving me the same issue when i try to hit the Delete key on that
3 years ago

Sorry, What i should have saiid is,

When i first Run the Program, and Enter in 3 or 6 it changes color to match the if Statments,

The problem is when i go to Remove the number inside the Edit Text then it will crash.
3 years ago
i am trying to get this part of my App working,


but it keeps giving me a java.lang.NumberFormatException: Invalid int: ""

@ a += Integer.parseInt(MyActivity.Hole1.getText().toString());

what i would like to have is if my number is less then 3 set text to Red or if its greater then 3 set text to Blue.

from my Code i am setting Sum to equal Hole1 but if Hole1 is Emtpy its not



My Activity.java class
3 years ago